Afonso_Diazgrouping swaps
    Updated 2025-05-07
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    swapper,
    symbol_in,
    symbol_out,
    token_in,
    token_out,
    nvl(amount_in_usd, amount_out_usd) as amount_usd
    from aptos.defi.ez_dex_swaps
    where
    platform = 'liquidswap'
    and amount_usd > 0
    )

    select
    case
    when amount_usd < 10 then '< $10'
    when amount_usd <= 50 then '$10 - $50'
    when amount_usd <= 100 then '$50 - $100'
    when amount_usd <= 500 then '$100 - $500'
    when amount_usd <= 1000 then '$500 - $1000'
    when amount_usd <= 5000 then '$1,000 - $5,000'
    when amount_usd <= 10000 then '$5,000 - $10,000'
    when amount_usd <= 100000 then '$10,000 - $100,000'
    else '> $100,000'
    end as type,
    count(distinct tx_hash) as swaps
    from
    main
    group by 1
    order by 1

    Last run: 14 days ago
    TYPE
    SWAPS
    1
    $1,000 - $5,000465550
    2
    $10 - $503423389
    3
    $10,000 - $100,0008603
    4
    $100 - $5003480090
    5
    $5,000 - $10,00025839
    6
    $50 - $1001628734
    7
    $500 - $1000714076
    8
    < $1012840757
    9
    > $100,000124
    9
    214B
    6s