winnie-fsstake_vol copy
    Updated 2023-04-14
    -- forked from h4wk / stake_vol @ https://flipsidecrypto.xyz/h4wk/q/2023-04-07-11-56-pm-Qdsrar

    with lido as (
    select
    initcap('lido') as platform,
    count(distinct origin_from_address) as user_count,
    count(distinct tx_hash) as tx_count,
    sum(raw_amount/1e18) as volume ,
    case when raw_amount/1e18 < 1 then 'a. Stake < 1 ETH'
    when raw_amount/1e18 < 10 then 'b. Stake < 10 ETH'
    when raw_amount/1e18 < 100 then 'c. Stake < 100 ETH'
    when raw_amount/1e18 < 1000 then 'd. Stake < 1k ETH'
    else 'e. Stake > 10k ETH' end as type
    from ethereum.core.ez_token_transfers
    where contract_address like lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
    and from_address like '0x0000000000000000000000000000000000000000'
    group by 1,5
    ),
    coinbase as (
    select
    initcap('coinbase') as platform,
    count(distinct origin_from_address) as user_count,
    count(distinct tx_hash) as tx_count,
    sum(raw_amount/1e18) as volume ,
    case when raw_amount/1e18 < 1 then 'a. Stake < 1 ETH'
    when raw_amount/1e18 < 10 then 'b. Stake < 10 ETH'
    when raw_amount/1e18 < 100 then 'c. Stake < 100 ETH'
    when raw_amount/1e18 < 1000 then 'd. Stake < 1k ETH'
    else 'e. Stake > 10k ETH' end as type
    from ethereum.core.ez_token_transfers

    WHERE contract_address LIKE lower('0xBe9895146f7AF43049ca1c1AE358B0541Ea49704')
    AND from_address LIKE '0x0000000000000000000000000000000000000000'
    group by 1,5
    ),
    frax as (
    Run a query to Download Data