Kruys-Collinsdistinct-aqua copy
    Updated 4 days ago
    -- forked from distinct-aqua @ https://flipsidecrypto.xyz/studio/queries/ad6c777d-1ad5-4de6-a8cf-f023f763637e

    SELECT
    COUNT(*) AS total_swaps,
    SUM(amount_in_usd) AS total_swap_volume,
    AVG(amount_in_usd) AS average_swap_size,
    MEDIAN(amount_in_usd) AS median_swap_size,
    COUNT(DISTINCT origin_from_address) AS total_unique_swappers
    FROM
    avalanche.defi.ez_dex_swaps
    WHERE
    token_in = lower('0xb2F85b7AB3c2b6f62DF06dE6aE7D09c010a5096E')
    OR token_out = lower('0xb2F85b7AB3c2b6f62DF06dE6aE7D09c010a5096E')

    Last run: 4 days ago
    TOTAL_SWAPS
    TOTAL_SWAP_VOLUME
    AVERAGE_SWAP_SIZE
    MEDIAN_SWAP_SIZE
    TOTAL_UNIQUE_SWAPPERS
    1
    220805422008863.771911.315309541703.753518
    1
    50B
    3s