sarathliquid1_stake1
    Updated 2022-09-03
    select avg(amount) as avg_staked_eth,avg(amount)*avg(price) as avg_staked_eth_usd, median(amount) as med_staked_eth,median(amount)*avg(price) as med_staked_eth_usd
    , max(amount) as max_staked_eth, max(amount)*avg(price) as max_staked_eth_usd, min(amount) as min_staked_eth, min(amount)*avg(price) as min_staked_eth_usd
    from
    ( select ETH_from_address, eth_to_address, sum(amount) as amount
    from ethereum.core.ez_eth_transfers
    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,2)
    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
    Run a query to Download Data