Eman-RazTotal Token Sold/Bought Count & Total Unique Swappers Count
    Updated 2023-04-05
    with arbitrum as (select 'Arbitrum' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from arbitrum.sushi.ez_swaps
    group by 1
    order by 1),
    avalanche as (select 'Avalanche' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from avalanche.sushi.ez_swaps
    group by 1
    order by 1),
    ethereum as (select 'Ethereum' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from ethereum.sushi.ez_swaps
    group by 1
    order by 1),
    gnosis as (select 'Gnosis' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from gnosis.sushi.ez_swaps
    group by 1
    order by 1),
    optimism as (select 'Optimism' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from optimism.sushi.ez_swaps
    group by 1
    order by 1),
    polygon as (select 'Polygon' as "Chain", count(distinct token_in) as "Total Token Sold Count", count(distinct token_out) as "Total Token Bought Count",
    count(distinct origin_from_address) as "Total Swapper Count"
    from polygon.sushi.ez_swaps
    group by 1
    order by 1)
    select * from arbitrum union all
    select * from avalanche union all
    select * from ethereum union all
    select * from gnosis union all
    select * from optimism union all
    select * from polygon
    Run a query to Download Data