nickpayiatis_ALGO Balances
Updated 2022-10-19
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
›
⌄
with asa_holders as(
select distinct address from flipside_prod_db.algorand.account_asset
where
asset_id = {{ASA_ID}}
and amount > 0
)
, algo_balance as(
select hold.address, balance,
case
when acc.balance > 0 and acc.balance <= 1 then '0-1 ALGOS'
when acc.balance > 1 and acc.balance <= 10 then '1-10 ALGOS'
when acc.balance > 10 and acc.balance <= 100 then '10-100 ALGOS'
when acc.balance > 100 and acc.balance <= 1000 then '100-1,000 ALGOS'
when acc.balance > 1000 and acc.balance <= 10000 then '1,000-10,000 ALGOS'
when acc.balance > 10000 and acc.balance <= 100000 then '10,000-100,000 ALGOS'
when acc.balance > 100000 and acc.balance <= 1000000 then '100,000-1,000,000 ALGOS'
else '+1,000,000 ALGOS'
end as "ALGO balance"
from asa_holders hold
left join flipside_prod_db.algorand.account acc on hold.address = acc.address
)
select "ALGO balance", count(*) as "Wallet Size", sum(balance) as "ALGOs"
from algo_balance
group by 1
order by 1
Run a query to Download Data