farid-c9j0VMALGO Balance Distribution of swappers
Updated 2022-07-08
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 a as (select DISTINCT SWAPPER
from flipside_prod_db.algorand.swaps
where BLOCK_TIMESTAMP >='2022-05-01' and BLOCK_TIMESTAMP <= '2022-06-30'
),
Balances as (
SELECT
address
, balance
FROM flipside_prod_db.algorand.account
WHERE
address in (select SWAPPER from a)
and account_closed = FALSE
)
select
DISTINCT
case
when balance < 10 then 'Below 10 ALGOs'
when balance >= 10 and balance <= 100 then '10-100 ALGOs'
when balance >= 100 and balance <= 1000 then '100-1K ALGOs'
when balance >= 1000 and balance <= 10000 then '1K-10K ALGOs'
else '10K+ ALGOs'
end as Balance_algo,
count(*) over(partition by Balance_algo) as algo_Count
from Balances
Run a query to Download Data