jackguyCopy of MakerDAO Activity Metrics 2
    Updated 2022-09-02
    SELECT
    -- date_trunc('week', block_timestamp) as week,
    count(DISTINCT tx_hash) as events,
    count(DISTINCT PAYER) as users,
    sum(AMOUNT_PAID * price) as volume
    FROM ethereum.maker.ez_repayments
    LEFT outer JOIN ethereum.core.fact_hourly_token_prices
    ON hour = date_trunc('day', block_timestamp)
    AND ethereum.maker.ez_repayments.symbol = ethereum.core.fact_hourly_token_prices.symbol
    WHERE block_timestamp > '2021-01-01'
    --GROUP BY 1
    Run a query to Download Data