Updated 2023-10-13
    SELECT
    TRUNC(block_timestamp, 'week') AS date,
    pool_name,
    COUNT(DISTINCT tx_hash) AS swaps,
    COUNT(DISTINCT origin_from_address) AS swappers,
    SUM(amount_out_usd) AS volume_swapped_usd,
    AVG(amount_out_usd) AS avg_volume_swapped_usd
    FROM
    avalanche.core.ez_dex_swaps
    WHERE
    platform = 'gmx'
    AND block_timestamp >= current_date - INTERVAL '90 DAYS'
    GROUP BY
    1, 2
    order by 1 asc
    Run a query to Download Data