freemartianDaily OP Rebate Reward
    Updated 2023-06-22
    -- SELECT * FROM optimism.core.fact_token_transfers
    -- WHERE tx_hash = '0x5a85f7888273763fae81494fa1b680f4f7da4ac9328afea9fe2636d49834eec8'

    SELECT
    date_trunc('day', block_timestamp::date) AS time,
    to_address AS user,
    sum(raw_amount)/pow(10,18) AS OP_Reward
    FROM optimism.core.fact_token_transfers
    WHERE from_address in(
    '0xfcc293db3b7396a1c2477c9f24f5f948431ef6ec',
    '0x549406bc1370a7efe86e2ae71dea3b67fa08b43d',
    '0xc37e1fb3d127d6194fc2f5fe18ec871c7366df63',
    '0xe9ae0110044bef983a44237bcd9d7255f1ac1a9f',
    '0x4e3ad6266a26c31e9b221d3cf48f1812531095f2')
    AND contract_address = '0x4200000000000000000000000000000000000042'
    GROUP BY time, user

    -- SELECT distinct from_address, sum(raw_amount) from optimism.core.fact_token_transfers
    -- WHERE contract_address = '0x4200000000000000000000000000000000000042'
    -- and to_address = lower('0x39fe1beef05ded01d35c2b97e3fb6939d4f0aee3')
    -- GROUP by 1
    Run a query to Download Data