elsinadaily gas in USD spent on Optimism
    Updated 2022-11-16
    with token_price as (
    select
    date_trunc('day', hour) as day,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where token_address is null
    group by 1
    )
    select
    date_trunc('day', block_timestamp) as date,
    avg(price) * sum(tx_fee) as fee_usd
    from optimism.core.fact_transactions join token_price on block_timestamp::date = day
    where date >= '2022-01-01' and date < current_date
    group by 1
    Run a query to Download Data