ML6distribution of purchased NFDomains by wallet
    Updated 2022-06-23
    with tbl as (select sum(amount) as amount,address from algorand.account_asset
    where asset_id in (select distinct asset_id from algorand.asset where asset_url like '%nfd.json%')
    and amount>0
    group by 2)

    select 'number of wallet has 1 nfd' , count(*) from tbl where amount=1
    UNION
    select 'number of wallet has 1 to 5 nfd' , count(*) from tbl where amount >1 and amount <=5
    UNION
    select 'number of wallet has 5 to 10 nfd' , count(*) from tbl where amount >5 and amount <=10
    UNION
    select 'number of wallet has 10 to 20 nfd' , count(*) from tbl where amount >10 and amount <=20
    UNION
    select 'number of wallet has 20 to 30 nfd' , count(*) from tbl where amount >20 and amount <=30
    UNION
    select 'number of wallet has 30 to 40 nfd' , count(*) from tbl where amount >30 and amount <=40
    UNION
    select 'number of wallet has mor than 40 nfd' , count(*) from tbl where amount >40
    Run a query to Download Data