RayyykFLOW Whales 1
Updated 2022-11-27Copy 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
›
⌄
with table_1 as (select recipient as wallets,
sum(amount) as amount_deposited
from flow.core.ez_token_transfers
where tx_succeeded = 'TRUE'
and token_contract = 'A.1654653399040a61.FlowToken'
group by 1),
table_2 as (select sender as wallets,
sum(amount) as amount_withdrew
from flow.core.ez_token_transfers
where tx_succeeded = 'TRUE'
and token_contract = 'A.1654653399040a61.FlowToken'
group by 1),
table_3 as (select a.wallets,
amount_deposited - amount_withdrew as flow_holdings
from table_1 a
join table_2 b on a.wallets = b.wallets
having flow_holdings > 0)
select case
when flow_holdings < 1 then 'a. Shrimp - Less than 1 Flow'
when flow_holdings >= 1 and flow_holdings < 100 then 'b. Fish - 1 to 100 Flow'
when flow_holdings >= 100 and flow_holdings <= 10000 then 'c. Dolphin - 100 to 10,000 Flow'
else 'd. Whale - More than 10,000 Flow'
end as category,
count(distinct(wallets)) as wallet_count,
(select count(distinct(wallets)) from table_3) as total_wallets
from table_3
group by 1
Run a query to Download Data