Updated 2024-06-04
    SELECT
    date_trunc('week', block_timestamp) as week,
    -- platform,
    count(DISTINCT tx_hash) as events,
    count(DISTINCT ORIGIN_FROM_ADDRESS) as users,
    sum(
    CASE
    when not amount_in_usd is NULL
    then amount_in_usd
    when not amount_out_usd is NULL
    then amount_out_usd
    else 0 end
    ) as volume_usd

    FROM base.defi.ez_dex_swaps
    WHERE not week is NULL
    --LIMIT 100
    GROUP BY 1 --,2

    QueryRunArchived: QueryRun has been archived