Updated 2023-01-18
    select 'Optimism' as type,
    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,
    median (amount_in_usd) as Median_Swap_Volume
    from optimism.sushi.ez_swaps
    where block_timestamp > CURRENT_DATE - 180 and block_timestamp<= CURRENT_DATE-1


    union ALL

    select 'Arbitrum' as type,
    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,
    median (amount_in_usd) as Median_Swap_Volume
    from arbitrum.sushi.ez_swaps
    where block_timestamp > CURRENT_DATE - 180 and block_timestamp<= CURRENT_DATE-1

    union ALL

    select 'Ethereum' as type,
    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,
    median (amount_in_usd) as Median_Swap_Volume
    from ethereum.sushi.ez_swaps
    where block_timestamp::date > CURRENT_DATE - 180 and block_timestamp::date<= CURRENT_DATE-1

    Run a query to Download Data