i_danWeekly Stats 1 copy
    Updated 2025-02-26
    SELECT
    date_trunc('week', block_timestamp) AS week
    , SUM(CASE WHEN amount_in_usd IS NULL THEN amount_out_usd ELSE amount_in_usd END) AS volume
    , SUM(volume) over (ORDER BY week) AS "Cumulative Volume"
    , COUNT(DISTINCT(tx_hash)) AS tx_count
    , SUM(tx_count) OVER (ORDER BY week) AS "Cumulative Transactions"
    , COUNT(DISTINCT(origin_from_address)) AS wallet_count
    , CASE WHEN week > trunc(current_date, 'week') - INTERVAL '1 week' THEN 'Current Week'
    WHEN week = trunc(current_date, 'week') - INTERVAL '1 week' THEN 'Last Week'
    ELSE 'Previous Weeks' end AS label
    FROM kaia.defi.ez_dex_swaps
    WHERE block_timestamp >= '2025-01-01'
    GROUP BY 1
    ORDER BY 1 DESC
    Last run: about 1 month ago
    WEEK
    VOLUME
    Cumulative Volume
    TX_COUNT
    Cumulative Transactions
    WALLET_COUNT
    LABEL
    1
    2025-02-24 00:00:00.0006470323.68208566992.725374914047486664Current Week
    2
    2025-02-17 00:00:00.00010958571.41202096669.049082013509999749Last Week
    3
    2025-02-10 00:00:00.0009402919.9191138097.638370212601799287Previous Weeks
    4
    2025-02-03 00:00:00.00027628869.89181735177.73206831117647725033Previous Weeks
    5
    2025-01-27 00:00:00.00023984666.02154106307.8416581396964617348Previous Weeks
    6
    2025-01-20 00:00:00.00034009721.7130121641.8219027880383316152Previous Weeks
    7
    2025-01-13 00:00:00.00041150256.2496111920.1226825861355517756Previous Weeks
    8
    2025-01-06 00:00:00.00037170412.8154961663.8823534034529714167Previous Weeks
    9
    2024-12-30 00:00:00.00017791251.0717791251.071099571099578073Previous Weeks
    9
    794B
    2s