nsa2000Weekly USD volume swaps to derivatives tokens of ETH
    Updated 2022-09-13
    SELECT
    date_trunc('week', block_timestamp) as "Week",
    COUNT(DISTINCT tx_hash) as "swap numbers",
    case when token_in = '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' THEN 'aETH'
    when token_in = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' THEN 'stETH'
    when token_in = '0xae78736cd615f374d3085123a210448e74fc6393' THEN 'rETH'
    end as "token name",
    sum(amount_in_usd)as "USD volume",
    sum("USD volume") over (partition by "token name" order by "Week") as "cumulative USD volume"
    from ethereum.core.ez_dex_swaps
    where token_in in ('0xe95a203b1a91a908f9b9ce46459d101078c2c3cb', '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' , '0xae78736cd615f374d3085123a210448e74fc6393')
    group by 1, 3
    Run a query to Download Data