pedramyzdistribution for swap volume on arbitrum
    Updated 2023-01-17
    with table1 as (select
    block_timestamp as date,
    count(distinct tx_hash) as swaps,
    sum(amount_in_usd) as usd_volume
    from arbitrum.sushi.ez_swaps
    where block_timestamp::date >= '2022-12-01'
    group by 1)

    select
    case when usd_volume < 10 then 'Less Than 10$'
    when usd_volume >= 10 and usd_volume < 100 then '10$-100$'
    when usd_volume >= 100 and usd_volume < 500 then '100$-500$'
    when usd_volume >= 500 and usd_volume < 1000 then '500$-1000$'
    when usd_volume >= 1000 and usd_volume < 5000 then '1000$-5000$'
    else 'More Than 5000$' end as type,
    swaps
    from table1
    where date>= '2022-12-01'
    group by 1,2
    Run a query to Download Data