rezarwzThe growth of the total volume of liquid staking ETH derivates swaps(USD)
    Updated 2022-09-13
    with base as (
    SELECT
    block_timestamp::date as date,
    POOL_NAME,
    PLATFORM,
    CASE
    WHEN token_in='0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' then 'aETHc'
    WHEN token_out='0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' then 'aETHc'
    WHEN token_in='0xae78736cd615f374d3085123a210448e74fc6393' then 'rETH'
    WHEN token_out='0xae78736cd615f374d3085123a210448e74fc6393' then 'rETH'
    WHEN token_in='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then 'stETH'
    WHEN token_out='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then 'stETH'
    end as symbol,
    CASE
    WHEN token_in='0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' then amount_in_usd
    WHEN token_out='0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' then amount_out_usd
    WHEN token_in='0xae78736cd615f374d3085123a210448e74fc6393' then amount_in_usd
    WHEN token_out='0xae78736cd615f374d3085123a210448e74fc6393' then amount_out_usd
    WHEN token_in='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_in_usd
    WHEN token_out='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_out_usd
    end as volume
    FROM ethereum.core.ez_dex_swaps
    WHERE symbol is not null and volume is not NULL and event_name='Swap')
    SELECT
    date,
    symbol,
    sum(volume) as daily_volume,
    sum(daily_volume) over (partition by symbol order by date) as usd_volume
    from base
    GROUP BY 1,2
    Run a query to Download Data