Sbhn_NPDistribution of Swap Size on Sushiswap Divided by Blockchain
    Updated 2022-10-16
    select 'Optimism' as blockchain,
    case when amount_in_usd < 10 then 'Less Than $10'
    when amount_in_usd >= 10 and amount_in_usd < 100 then '$10 - $100'
    when amount_in_usd >= 100 and amount_in_usd < 1000 then '$100 - $1000'
    when amount_in_usd >= 1000 and amount_in_usd < 10000 then '$1000 - $10000'
    when amount_in_usd >= 10000 and amount_in_usd < 100000 then '$10000 - $100000'
    else 'More Than $100000 Volume' end as type,
    sum(amount_in_usd) as Swap_volume
    from optimism.sushi.ez_swaps
    where block_timestamp >= '2022-06-01'
    group by 1,2

    union ALL

    select 'Arbitrum' as blockchain,
    case when amount_in_usd < 10 then 'Less Than $10'
    when amount_in_usd >= 10 and amount_in_usd < 100 then '$10 - $100'
    when amount_in_usd >= 100 and amount_in_usd < 1000 then '$100 - $1000'
    when amount_in_usd >= 1000 and amount_in_usd < 10000 then '$1000 - $10000'
    when amount_in_usd >= 10000 and amount_in_usd < 100000 then '$10000 - $100000'
    else 'More Than $100000 Volume' end as type,
    sum(amount_in_usd) as Swap_volume
    from arbitrum.sushi.ez_swaps
    where block_timestamp >= '2022-06-01'
    group by 1,2

    union ALL

    select 'Polygon' as blockchain,
    case when amount_in_usd < 10 then 'Less Than $10'
    when amount_in_usd >= 10 and amount_in_usd < 100 then '$10 - $100'
    when amount_in_usd >= 100 and amount_in_usd < 1000 then '$100 - $1000'
    when amount_in_usd >= 1000 and amount_in_usd < 10000 then '$1000 - $10000'
    when amount_in_usd >= 10000 and amount_in_usd < 100000 then '$10000 - $100000'
    else 'More Than $100000 Volume' end as type,
    sum(amount_in_usd) as Swap_volume
    Run a query to Download Data