Abolfazl_771025top 10 pool by count of swap
    Updated 2022-10-25
    with main as (select
    concat(symbol_in, ' - ', symbol_out) as "Pool",
    count(distinct tx_hash) as "count of swap",
    sum(AMOUNT_out_USD) as "volume (USD) of swap"
    from ethereum.core.ez_dex_swaps
    where TOKEN_out = lower('0x4d224452801ACEd8B2F0aebE155379bb5D594381')
    and AMOUNT_out_USD is not null
    group by 1
    union
    select
    concat(symbol_in, ' - ', symbol_out) as "Pool",
    count(distinct tx_hash) as "count of swap",
    sum(AMOUNT_in_USD) as "volume (USD) of swap"
    from ethereum.core.ez_dex_swaps
    where TOKEN_in = lower('0x4d224452801ACEd8B2F0aebE155379bb5D594381')
    and AMOUNT_in_USD is not null
    group by 1)
    select
    "Pool",
    "count of swap",
    "volume (USD) of swap"
    from main
    order by 2 desc
    limit 10
    Run a query to Download Data