sinahosseinzadehUntitled Query
    Updated 2022-09-01

    select case
    when eth_to_address = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A') then 'Stakewise'
    when eth_to_address = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670') then 'stkr'
    when eth_to_address = lower('0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd') then 'Cream'
    when eth_to_address = lower('0x4D05E3d48a938db4b7a9A59A802D5b45011BDe58') then 'Rocket_pool'
    when eth_to_address = lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84') then 'Lido'
    when eth_to_address = lower('0x00000000219ab540356cBB839Cbe05303d7705Fa') then 'Direct staking' end as platforms
    , count(distinct ETH_from_address) as depositors, sum(amount) as staked_eth, staked_eth*avg(price) as staked_eth_usd
    from ethereum.core.ez_eth_transfers as tb1
    join(
    select hour, price
    from ethereum.core.fact_hourly_token_prices
    where token_address = lower('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')
    order by 1 desc
    limit 1
    ) as tb2 on true
    where eth_to_address in (lower('0xC874b064f465bdD6411D45734b56fac750Cda29A'), lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670'), lower('0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd')
    ,lower('0x4D05E3d48a938db4b7a9A59A802D5b45011BDe58'), lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84'), lower('0x00000000219ab540356cBB839Cbe05303d7705Fa'))
    and not (eth_from_address in (lower('0xC874b064f465bdD6411D45734b56fac750Cda29A'), lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670'), lower('0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd')
    ,lower('0x4D05E3d48a938db4b7a9A59A802D5b45011BDe58'), lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84')) and eth_to_address = lower('0x00000000219ab540356cBB839Cbe05303d7705Fa'))
    group by 1
    order by 4 desc
    Run a query to Download Data