farid-c9j0VMHODL or SELL
Updated 2022-06-15
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
›
⌄
with lido_eth_stakes as (
select origin_address as wallet , sum(amount) as total_staked_eth
from ethereum.udm_events
where to_address_name = 'stETH' and to_label_subtype = 'token_contract' and event_type = 'native_eth'
and block_timestamp::date >= '2022-03-15' and block_timestamp::date < '2022-04-05'
group by 1
),
wallets_balance as (
select user_address , non_adjusted_balance/pow(10,18) as balance
from ethereum.erc20_balances
where user_address in (select wallet from lido_eth_stakes) and balance_date = date('2022-06-15')
and contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' and non_adjusted_balance is not null
),
hodl_or_sell_status as(
select wallet , total_staked_eth , ifnull(balance,0) as balance ,
case when balance/total_staked_eth < 0.0001 then 'Fully Sold'
when (balance/total_staked_eth >= 0.0001 and balance/total_staked_eth <= 0.5) then 'More than 50% sold'
when (balance/total_staked_eth > 0.5 and balance/total_staked_eth<1)then 'Less than 50% sold'
else 'Fully HODL' end as status
from lido_eth_stakes left join wallets_balance
on wallet = user_address
)
select status , count(*) as number_of_wallets
from hodl_or_sell_status
group by status
Run a query to Download Data