SpecterDistribution of tx
    Updated 2025-02-25
    WITH swapper_tx_count AS (
    SELECT
    sender,
    COUNT(distinct tx_hash) AS tx_count
    FROM (
    SELECT sender, tx_hash FROM avalanche.defi.ez_dex_swaps WHERE symbol_in = 'sAVAX'
    UNION ALL
    SELECT sender, tx_hash FROM avalanche.defi.ez_dex_swaps WHERE symbol_out = 'sAVAX'
    ) AS combined_swaps
    GROUP BY sender
    )
    SELECT
    CASE
    WHEN tx_count = 1 THEN '1 Transaction'
    WHEN tx_count = 2 THEN '2 Transactions'
    WHEN tx_count BETWEEN 3 AND 5 THEN '3-5 Transactions'
    WHEN tx_count BETWEEN 6 AND 10 THEN '6-10 Transactions'
    ELSE '>10 Transactions'
    END AS tx_count_category,
    COUNT(sender) AS num_swappers
    FROM swapper_tx_count
    GROUP BY tx_count_category
    ORDER BY num_swappers DESC;

    QueryRunArchived: QueryRun has been archived