Updated 2022-11-12
    select(sum(t.gas_used/pow(10,9)) * avg(p.price)) as results,avg(p.price), to_date(t.block_timestamp) as dates
    from optimism.core.fact_transactions as t inner join optimism.core.fact_hourly_token_prices as p
    on to_date(p.hour) = to_date(t.block_timestamp) and hour(p.hour) = hour(t.block_timestamp) and to_date(t.block_timestamp) > current_date - 31 and p.symbol='OP' and status='SUCCESS'
    group by dates
    Run a query to Download Data