CoinConverseETH Derivatives SwapAway
    Updated 2022-09-13
    with aETH as (
    select block_timestamp::date as dt,
    count(distinct tx_hash) as Swaps_Count,
    count(distinct origin_from_address) as Swappers_Count,
    sum(amount_in_usd) as volume, 'SwapAway aETH' as action_type
    from ethereum.core.ez_dex_swaps
    where token_in = '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb' and amount_in_usd > 0
    and block_timestamp::date >= '2022-01-01'
    group by 1
    ),

    stETH as (
    select block_timestamp::date as dt,
    count(distinct tx_hash) as Swaps_Count,
    count(distinct origin_from_address) as Swappers_Count,
    sum(amount_in_usd) as volume, 'SwapAway stETH' as action_type
    from ethereum.core.ez_dex_swaps
    where token_in = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' and amount_in_usd > 0
    and block_timestamp::date >= '2022-01-01'
    group by 1
    ),

    rETH as (
    select block_timestamp::date as dt,
    count(distinct tx_hash) as Swaps_Count,
    count(distinct origin_from_address) as Swappers_Count,
    sum(amount_in_usd) as volume, 'SwapAway rETH' as action_type
    from ethereum.core.ez_dex_swaps
    where token_in = '0xae78736cd615f374d3085123a210448e74fc6393' and amount_in_usd > 0
    and block_timestamp::date >= '2022-01-01'
    group by 1
    )

    select * from (select * from aETH
    union all
    select * from stETH
    Run a query to Download Data