datavortexDex ranking
    Updated 2024-12-17
    SELECT
    platform,
    total_swaps,
    total_volume,
    active_users,
    RANK() OVER (ORDER BY total_swaps DESC) AS swap_rank,
    RANK() OVER (ORDER BY total_volume DESC) AS volume_rank,
    RANK() OVER (ORDER BY active_users DESC) AS user_rank
    FROM (
    SELECT
    platform,
    COUNT(DISTINCT tx_hash) AS total_swaps,
    SUM(amount_in_usd) AS total_volume,
    COUNT(DISTINCT origin_from_address) AS active_users
    FROM
    kaia.defi.ez_dex_swaps
    GROUP BY
    platform
    ) AS platform_metrics
    ORDER BY
    total_swaps DESC;
    QueryRunArchived: QueryRun has been archived