pine_samiTotal volume of ETH Derivatives swaps (from/to)
    Updated 2022-09-13
    select
    'aETH' as Derivatives,
    sum (case when symbol_in ='aETH' then amount_in when symbol_out ='aETH' then amount_out END ) as amount
    from ethereum.core.ez_dex_swaps
    UNION
    select 'rETH',
    sum (case when TOKEN_IN ='0xae78736cd615f374d3085123a210448e74fc6393' then amount_in when TOKEN_OUT ='0xae78736cd615f374d3085123a210448e74fc6393' then amount_out END)
    from ethereum.core.ez_dex_swaps
    UNION
    select 'stETH',
    sum (case when TOKEN_IN ='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_in when TOKEN_OUT ='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_out END)
    from ethereum.core.ez_dex_swaps
    where TOKEN_IN ='0xae7ab96520de3a18e5e111b5eaab095312d7fe84'

    Run a query to Download Data