Updated 2022-11-12
    select 'Ethereum' as label , (sum(t.gas_used/pow(10,9)) * avg(p.price)) as results , to_date(t.block_timestamp) as dates
    from ethereum.core.fact_transactions as t inner join ethereum.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.token_address is null and status='SUCCESS'
    group by dates
    UNION

    select 'Optimism' as label , (sum(t.gas_used/pow(10,9)) * avg(p.price)) as results, 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
    UNION

    select 'Algorand' as label , (sum(t.fee) * avg(p.price_usd)) as results, to_date(t.block_timestamp) as dates
    from algorand.core.fact_transaction as t inner join algorand.core.ez_price_pool_balances as p
    on to_date(p.block_hour) = to_date(t.block_timestamp) and hour(p.block_hour) = hour(t.block_timestamp) and to_date(t.block_timestamp) > current_date - 31 and p.asset_id=0
    group by dates
    UNION

    select 'Solana' as label , (sum(t.fee/pow(10,9)) * avg(p.close)) as results, to_date(t.block_timestamp) as dates
    from solana.core.fact_transactions as t inner join solana.core.fact_token_prices_hourly as p
    on to_date(p.recorded_hour) = to_date(t.block_timestamp) and hour(p.recorded_hour) = hour(t.block_timestamp) and to_date(t.block_timestamp) > current_date - 31 and p.id='solana' and succeeded='TRUE'
    group by dates
    UNION

    select 'Osmosis' as label , (sum(t.gas_used/pow(10,9)) * avg(p.price)) as results, to_date(t.block_timestamp) as dates
    from osmosis.core.fact_transactions as t inner join osmosis.core.dim_prices as p
    on to_date(p.recorded_at) = to_date(t.block_timestamp) and hour(p.recorded_at) = hour(t.block_timestamp) and to_date(t.block_timestamp) > current_date - 31 and p.symbol='OSMO' and tx_status='SUCCEEDED'
    group by dates
    UNION
    select 'Flow' as label , (sum(t.gas_limit/pow(10,9)) * avg(p.price_usd)) as results, to_date(t.block_timestamp) as dates
    Run a query to Download Data