Abolfazl_771025top 10 swappers by volume (USD) of swap
    Updated 2022-11-12
    with main as (select
    DISTINCT ORIGIN_FROM_ADDRESS as users,
    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_in = lower('0xb3999F658C0391d94A37f7FF328F3feC942BcADC')
    and AMOUNT_out_USD is not null
    group by 1
    union
    select
    DISTINCT ORIGIN_to_ADDRESS as users,
    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_out = lower('0xb3999F658C0391d94A37f7FF328F3feC942BcADC')
    and AMOUNT_in_USD is not null
    group by 1)
    select
    users,
    "count of swap",
    "volume (USD) of swap"
    from main
    order by 3 desc
    limit 10
    Run a query to Download Data