ramishoowOvertime Markets - Profitable Traders
    Updated 2022-08-25
    --(Cumulative Volume Two Weeks)
    SELECT DATE ,ToOOtal_Volume ,sum(ToOOtal_Volume) over (ORDER BY date rows BETWEEN unbounded preceding AND CURRENT ROW) as cum_Total_Volume FROM(
    SELECT DATE(BLOCK_TIMESTAMP) AS date,sum(EVENT_INPUTS:value / pow(10,18)) ToOOtal_Volume FROM optimism.core.fact_event_logs
    WHERE CONTRACT_ADDRESS = '0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9' AND TX_STATUS='SUCCESS' AND EVENT_INPUTS:from <> '0x0000000000000000000000000000000000000000' AND ORIGIN_TO_ADDRESS = '0x170a5714112daeff20e798b6e92e25b86ea603c1'
    AND EVENT_INPUTS:to = '0x170a5714112daeff20e798b6e92e25b86ea603c1' AND DATE(BLOCK_TIMESTAMP) >= CURRENT_DATE - 14
    GROUP BY 1)
    --WHERE CONTRACT_ADDRESS = '0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9' AND TX_STATUS='SUCCESS' AND EVENT_INPUTS:from <> '0x0000000000000000000000000000000000000000' AND ORIGIN_TO_ADDRESS = '0x170a5714112daeff20e798b6e92e25b86ea603c1'
    --AND EVENT_INPUTS:to = '0x170a5714112daeff20e798b6e92e25b86ea603c1'

    Run a query to Download Data