maybeyonastoke_top_holders
Updated 2022-06-21
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 top_lads as (
select
balance_date,
user_address,
balance
from ethereum.erc20_balances
where contract_address = lower('0x2e9d63788249371f1DFC918a52f8d799F4a38C94')
and balance_date = '2022-01-07'
and user_address not in (
-- lower('0x96f98ed74639689c3a11daf38ef86e59f43417d3'), -- toke staking
-- lower('0x8b4334d4812c530574bd4f2763fcd22de94a969b'), -- treasury
-- lower('0xa760e26aa76747020171fcf8bda108dfde8eb930'), -- toke pool
lower('0x79dd22579112d8a5f7347c5ed7e609e60da713c5') -- toke rewards
-- lower('')
)
order by balance desc
limit 20
),
current_bals as (
select
user_address,
balance
from ethereum.erc20_balances
where contract_address = lower('0x2e9d63788249371f1DFC918a52f8d799F4a38C94')
and balance_date = current_date
and user_address in (
select user_address from top_lads
)
order by balance desc
)
select
t.user_address,
case when b.balance is null then 0 else b.balance end as current_balance,
t.balance as jan_balance,
current_balance-jan_balance as diff
Run a query to Download Data