Eman-Razswap by platform
    Updated 2023-09-20
    --------------------------------------------------------Arbitrum----------------------------------------------------------------------------

    with arbitrum as (with tab1 as (select platform, sum(amount_in_usd) as selling_volume_usd, sum(amount_in) as selling_volume,
    count(distinct tx_hash) as selling_count, count(distinct origin_from_address) as seller_count
    from arbitrum.core.ez_dex_swaps
    where token_in=lower('0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f') and block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    group by 1),

    tab2 as (select platform, sum(amount_out_usd) as buying_volume_usd, sum(amount_out) as buying_volume,
    count(distinct tx_hash) as buying_count, count(distinct origin_from_address) as buyer_count
    from arbitrum.core.ez_dex_swaps
    where token_out=lower('0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f') and block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    group by 1)

    select 'Arbitrum' as "⛓Chain", tab1.platform, selling_volume_usd+buying_volume_usd as "💵Swap Volume (USD)",
    selling_volume_usd AS "🔴Selling Volume (USD)", buying_volume_usd AS "🟢Buying Volume (USD)",
    buying_volume_USD-selling_volume_USD as "🔰Net Volume (USD)"
    , selling_volume+buying_volume as "💰Swap Volume (BTC)",
    selling_volume AS "🔴Selling Volume (BTC)", buying_volume AS "🟢Buying Volume (BTC)",
    buying_volume-selling_volume as "🔰Net Volume (BTC)",
    SELLING_COUNT AS "📤Selling Count",
    buying_count as "📥Buying Count",
    selling_count+buying_count as "🔄Swap Count", seller_count as "👤Seller Count", buyer_count as "👩‍💻Buyer Count"
    from tab1 left join tab2 on tab1.platform=tab2.platform),

    -------------------------------------------------Ethereum-----------------------------------------------------------------------------------

    ethereum as (with tab1 as (select platform, sum(amount_in_usd) as selling_volume_usd, sum(amount_in) as selling_volume,
    count(distinct tx_hash) as selling_count, count(distinct origin_from_address) as seller_count
    from ethereum.core.ez_dex_swaps
    where token_in=lower('0x2260fac5e5542a773aa44fbcfedf7c193bc2c599') and block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    group by 1),


    tab2 as (select platform, sum(amount_out_usd) as buying_volume_usd, sum(amount_out) as buying_volume,
    count(distinct tx_hash) as buying_count
    Run a query to Download Data