0xPrzActive Swappers Per Day
    Updated 2022-10-25
    select 'Optimism' as blockchain,
    date_trunc(day,block_timestamp) as date,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct origin_from_address) as Swappers_Count,
    sum (amount_in_usd) as Total_Swap_Volume,
    avg (amount_in_usd) as Average_Swap_Volume,
    sum (total_swap_volume) over (order by date) as Cumulative_Volume,
    sum (swaps_count) over (order by date) as Cumulative_Swaps
    from optimism.sushi.ez_swaps
    group by 1,2

    union ALL

    select 'Ethereum' as blockchain,
    date_trunc(day,block_timestamp) as date,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct origin_from_address) as Swappers_Count,
    sum (amount_in_usd) as Total_Swap_Volume,
    avg (amount_in_usd) as Average_Swap_Volume,
    sum (total_swap_volume) over (order by date) as Cumulative_Volume,
    sum (swaps_count) over (order by date) as Cumulative_Swaps
    from Ethereum.sushi.ez_swaps
    group by 1,2
    Run a query to Download Data