maybeyonastop_accounts
Updated 2022-10-17
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
35
36
›
⌄
with
data as (
select
balance_date,
user_address,
non_adjusted_balance/pow(10,18) as eth_balance,
rank() over(partition by balance_date order by eth_balance desc) as bal_rank
from ethereum.erc20_balances
where symbol = 'ETH'
and contract_address = 'ETH'
and day(balance_date) = 1
and balance_date >= '2021-01-01' and balance_date < '2022-09-01'
-- and non_adjusted_balance/pow(10,18) < 150000000
-- and user_address = lower('0x364F7Fd945B8c76C3C77d6ac253f1fEa3B65E00d')
)
select
balance_date,
sum(eth_balance) as supply,
sum(
case when bal_rank<= 10 then eth_balance else 0 end
) as top10_supply,
sum(
case when bal_rank<= 100 then eth_balance else 0 end
) as top100_supply,
top10_supply*100/supply as top10_percent,
top100_supply*100/supply as top100_percent
from data
group by 1
order by balance_date
-- select * from ethereum.erc20_balances
-- where symbol = 'ETH'
-- and day(balance_date) = 1
-- and balance_date >= '2021-01-01' and balance_date < '2022-09-01'
-- and non_adjusted_balance/pow(10,18) < 150000000
Run a query to Download Data