datavortexSwapper Categories By Number Of USDT Swappers
    Updated 2025-05-12
    WITH swaps_metrics AS (
    SELECT
    swapper AS "total swappers",
    token_out AS "bought symbol",
    COALESCE(amount_out_usd, 0) AS "bought amount"
    FROM
    aptos.defi.ez_dex_swaps
    WHERE
    (token_in = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDT'
    OR token_out = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDT')
    AND block_timestamp BETWEEN '2024-01-01' AND '2024-12-31'
    ),
    swapper_volume AS (
    SELECT
    "total swappers",
    SUM(COALESCE("bought amount", 0)) AS "Total USDT Volume"
    FROM
    swaps_metrics
    GROUP BY
    "total swappers"
    ),
    categorized_swappers AS (
    SELECT
    "total swappers",
    "Total USDT Volume",
    CASE
    WHEN "Total USDT Volume" > 100000 THEN 'Whales'
    WHEN "Total USDT Volume" BETWEEN 10000 AND 100000 THEN 'Dolphins'
    WHEN "Total USDT Volume" BETWEEN 1000 AND 10000 THEN 'Sharks'
    WHEN "Total USDT Volume" BETWEEN 100 AND 1000 THEN 'Crabs'
    WHEN "Total USDT Volume" < 100 THEN 'Planktons'
    END AS swapper_category
    FROM
    swapper_volume
    )
    SELECT
    Last run: 11 days ago
    SWAPPER_CATEGORY
    NUM_SWAPPERS
    TOTAL_USDT_VOLUME
    1
    Whales851572486120.834294
    2
    Dolphins7509184185648.806686
    3
    Sharks35053108749893.022275
    4
    Crabs6228721838043.5546311
    5
    Planktons2777802622463.6640007
    5
    172B
    9s