Pmisha-bmlMdxhold.dist.goose
Updated 2022-06-10Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
›
⌄
with NFTs as (SELECT
asset_id
from algorand.asset
where total_supply = 1
and decimals = 0
and asset_deleted = 'False'
and asset_name ilike '%CGF%'),
ds as (select
distinct address as ww
from flipside_prod_db.algorand.account_asset
where ASSET_ID in (select ASSET_ID from NFTs)
and amount>0
)
select
case
when balance between 0 and 10 then 'a. 0-10'
when balance between 11 and 100 then 'b. 11-100'
when balance between 101 and 500 then 'c. 101-500'
when balance between 501 and 2000 then 'd. 501-2000'
when balance> 2000 then 'e. over 2000'
end as buckets,
count(distinct ADDRESS) as users
from flipside_prod_db.algorand.account
where ADDRESS in (select ww from ds)
group by 1 having buckets is not null
Run a query to Download Data