Updated 2022-11-22
    select
    date_trunc('week', S.BLOCK_TIMESTAMP) as date,
    PROJECT_NAME,
    avg (PRICE_USD) as Price,
    count (distinct TX_ID) as TXN,
    count (distinct SENDER) as Users,
    sum ( DISTINCT AMOUNT) as volume,
    volume * Price as USD,

    sum (TXN) over (partition by PROJECT_NAME order by date ) as cum_TXN,
    sum (Users) over (partition by PROJECT_NAME order by date ) as cum_Users,
    sum (USD) over (partition by PROJECT_NAME order by date ) as cum_USD
    FROM flow.core.ez_token_transfers S
    JOIN flow.core.fact_prices P ON P.TOKEN_CONTRACT = S.TOKEN_CONTRACT and P.TIMESTAMP::DATE = S.BLOCK_TIMESTAMP::DATE
    JOIN crosschain.core.address_labels L ON L.ADDRESS = S.RECIPIENT

    WHERE AMOUNT > 0 and LABEL_TYPE = 'cex' and TX_SUCCEEDED = 'TRUE'
    and S.BLOCK_TIMESTAMP < CURRENT_DATE
    group by 1,2
    Run a query to Download Data