binhachonLido Whales - Where do they deposit
Updated 2022-05-31
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 LIDO_top_holders as (
select
*
from flipside_prod_db.ethereum.erc20_balances
where balance_date in (select max(balance_date) from flipside_prod_db.ethereum.erc20_balances)
and contract_address = '0x5a98fcbea516cf06857215779fd812ca3bef1b32'
order by balance desc
limit 100
),
stETH_transactions as (
select
top_100,
destination,
contract_address,
sum(deposit_amount) as deposit_amount
from (
select
from_address as top_100,
to_address as destination,
contract_address,
raw_amount/1e18 as deposit_amount
from flipside_prod_db.ethereum_core.fact_token_transfers
where contract_address in ('0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', '0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
and top_100 in (select user_address from LIDO_top_holders)
union all
select
to_address as top_100,
from_address as destination,
contract_address,
-raw_amount/1e18 as deposit_amount
from flipside_prod_db.ethereum_core.fact_token_transfers
where contract_address in ('0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', '0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
and top_100 in (select user_address from LIDO_top_holders)
)
group by 1, 2, 3
)
Run a query to Download Data