kasadegh distribution of ALGO holdings
Updated 2022-06-16
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
32
33
34
›
⌄
with new_wallet_in_may as (
select count(distinct a.ADDRESS) as "number_of_new_wallet_in_may" from flipside_prod_db.algorand.account as a
join flipside_prod_db.algorand.block as b
on b.BLOCK_ID=a.CREATED_AT
where date(b.BLOCK_TIMESTAMP)>='2022-05-01' and date(b.BLOCK_TIMESTAMP)<='2022-05-30' and a.ACCOUNT_CLOSED=0
),
new_wallet_in_may_with_more_than_1 as (
select a.ADDRESS,a.BALANCE from flipside_prod_db.algorand.account as a
join flipside_prod_db.algorand.block as b
on b.BLOCK_ID=a.CREATED_AT
where date(b.BLOCK_TIMESTAMP)>='2022-05-01' and date(b.BLOCK_TIMESTAMP)<='2022-05-30' and a.ACCOUNT_CLOSED=0 and a.BALANCE>1
order by a.BALANCE desc
)
select "bin",count(*) as "Total number of wallets" from
(
select BALANCE,CASE
WHEN BALANCE<100 THEN '<100'
WHEN BALANCE>100 and BALANCE<1000 THEN '>100 and <1000'
WHEN BALANCE>1000 and BALANCE<10000 THEN '>1000 and <10000'
WHEN BALANCE>10000 and BALANCE<100000 THEN '>10000 and <100000'
WHEN BALANCE>100000 and BALANCE<1000000 THEN '>100000 and <1000000'
WHEN BALANCE>100000 and BALANCE<10000000 THEN '>1000000 and <10000000'
ELSE '>10000000' END as "bin"
from new_wallet_in_may_with_more_than_1
) as tt
group by "bin"
order by "bin"
Run a query to Download Data