pouya_22Transaction Fees - Types
    Updated 2022-05-22
    with fees as (select block_timestamp::date as date, tx_id, cast(replace(fee, 'uosmo', '') as int) * power(10, -6) as paid_fee
    from osmosis.core.fact_transactions
    where date >= current_date - 30
    and fee not like '0%'),

    types as (select a.tx_id, paid_fee, msg_type
    from fees a
    left join osmosis.core.fact_msgs b
    on a.tx_id = b.tx_id)

    select msg_type, sum(paid_fee) as total_fee
    from types
    group by msg_type
    order by total_fee desc

    Run a query to Download Data