mehrancrypto-dxoepqUntitled Query
Updated 2022-09-01
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 staked as (
SELECT ETH_FROM_ADDRESS as wallet ,
CASE
WHEN eth_to_address = ('0xae7ab96520de3a18e5e111b5eaab095312d7fe84') THEN 'Lido'
WHEN eth_to_address = '0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd' THEN 'Cream'
WHEN eth_to_address = '0x84db6ee82b7cf3b47e8f19270abde5718b936670' THEN 'Stkr'
WHEN eth_to_address = '0x4d05e3d48a938db4b7a9a59a802d5b45011bde58' THEN 'Rocket pool'
WHEN eth_to_address = '0xc874b064f465bdd6411d45734b56fac750cda29a' THEN 'Stakewise'
WHEN eth_to_address = '0x00000000219ab540356cbb839cbe05303d7705fa' THEN 'Direct staking'
end as staking_platform ,
sum(AMOUNT) as staked_amount_ETH
from ethereum.core.ez_eth_transfers
where STAKING_PLATFORM is not null
group by 1 ,2
)
SELECT staking_platform ,
case
when staked_amount_ETH >0 and staked_amount_ETH < 1 then 'Staked less than 1 ETH'
when staked_amount_ETH >=1 and staked_amount_ETH < 5 then 'Staked more than 1 ETH and less than 5 ETH'
when staked_amount_ETH >=5 and staked_amount_ETH < 10 then 'Staked more than 5 ETH and less than 10 ETH'
when staked_amount_ETH >=10 and staked_amount_ETH < 20 then 'Staked more than 10 ETH and less than 20 ETH'
when staked_amount_ETH >= 20 and staked_amount_ETH < 30 then 'Staked more than 20 ETH and less than 30 ETH'
when staked_amount_ETH >= 30 and staked_amount_ETH < 50 then 'Staked more than 30 ETH and less than 50 ETH'
when staked_amount_ETH >= 50 and staked_amount_ETH < 100 then 'Staked more than 50 ETH and less than 100 ETH'
when staked_amount_ETH >= 100 then 'Staked more than 100 ETH'
end as distribution , count( DISTINCT wallet) as number
from staked
GROUP by 1 , 2
Run a query to Download Data