freemartianUntitled Query
    Updated 2022-11-15
    select
    'Osmosis' as blockchain,
    block_timestamp::date as day,
    sum(split(fee,'uosmo')[0]::numeric/pow(10,6)) * avg(price) as Fee_in_usd,
    block_id
    from osmosis.core.fact_transactions inner join osmosis.core.dim_prices p
    on RECORDED_AT::date = block_timestamp::date and hour(p.RECORDED_AT) = hour(block_timestamp)
    where block_timestamp > CURRENT_DATE - 31
    and tx_status = 'SUCCEEDED'
    and symbol = 'OSMO'
    and fee ilike '%uosmo%'
    group by day, block_id
    Run a query to Download Data