misaghlbETH Derivatives - buy
    Updated 2022-09-12
    SELECT date_trunc('week', block_timestamp) as date,
    COUNT(DISTINCT tx_hash) as swap_count,
    case when token_in = '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' THEN 'aETH'
    when token_in = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' THEN 'stETH'
    when token_in = '0xae78736cd615f374d3085123a210448e74fc6393' THEN 'rETH'
    when token_in = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' THEN 'ETH'
    end as name,
    sum(amount_in_usd) as vol, sum(vol) over (partition by name order by date) as cumu_vol
    from ethereum.core.ez_dex_swaps
    where token_in in ('0xe95a203b1a91a908f9b9ce46459d101078c2c3cb', '0xae78736cd615f374d3085123a210448e74fc6393', '0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
    and date BETWEEN '2022-01-01' and CURRENT_DATE - 1
    group by date, name
    ORDER by (date, name) DESC
    Run a query to Download Data