chispasaccessible-azure
    Updated 2024-09-19
    SELECT
    CONCAT(LEAST(symbol_in, symbol_out), '-', GREATEST(symbol_in, symbol_out)) AS pair,
    SUM(CASE WHEN amount_out_usd IS NULL THEN amount_in_usd ELSE amount_out_usd END) AS total_volume,
    COUNT(DISTINCT tx_hash) AS swaps,
    COUNT(DISTINCT origin_from_address) AS tradoors
    FROM
    ETHEREUM.defi.ez_dex_swaps
    WHERE
    platform LIKE '%uniswap%'
    AND block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '24 hours'
    GROUP BY
    pair
    HAVING
    total_volume > 0
    ORDER BY
    total_volume DESC
    LIMIT
    10
    QueryRunArchived: QueryRun has been archived