Afonso_DiazSwaps Breakdown
    Updated 2025-03-29
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    iff(token_in = lower('0x9a26f5433671751c3276a065f57e5a02d2817973'), 'Sell', 'Buy') as type,
    nvl(amount_in_usd, amount_out_usd) as amount_usd,
    symbol_in,
    symbol_out
    from
    base.defi.ez_dex_swaps
    where
    lower('0x9a26f5433671751c3276a065f57e5a02d2817973') in (token_in, token_out)
    )

    select
    type,
    case
    when amount_usd < 10 then 'Plankton (Less than $10)'
    when amount_usd <= 50 then 'Shrimp ($10 - $50)'
    when amount_usd <= 100 then 'Crab ($50 - $100)'
    when amount_usd <= 500 then 'Octopus ($100 - $500)'
    when amount_usd <= 1000 then 'Fish ($500 - $1,000)'
    when amount_usd <= 5000 then 'Dolphin ($1,000 - $5,000)'
    when amount_usd <= 10000 then 'Shark ($5,000 - $10,000)'
    when amount_usd <= 100000 then 'Whale ($10,000 - $100,000)'
    else 'Giant Squid (More than $100,000)'
    end as tx_type,
    count(distinct tx_hash) as transactions
    from
    main
    group by 1, 2
    order by 1, 2
    QueryRunArchived: QueryRun has been archived