goanji6455sum of fee and mean fee
    Updated 2022-05-25
    with
    special_tx as (select right(fee,5) as currency from osmosis.core.fact_transactions where tx_id='16EBE5ABD75B1E297EABC04B1593E1DBE6782F76797F10D27B3DD5BAB5FACEFC'),
    a as(
    select
    distinct M.BLOCK_TIMESTAMP::date as date,
    cast(left(T.fee, len(T.fee)-5) as numeric) as tx_fee, msg_type
    from osmosis.core.fact_msgs as M
    join osmosis.core.fact_transactions as T on M.tx_id=T.tx_id
    where msg_type in ('delegate','redelegate','burn','transfer','coin_spent','message')
    and right(T.fee, 5) in (select currency from special_tx)
    and date>='2022-04-25'-- and tx_fee!=0
    order by date
    )
    select msg_type, sum(tx_fee) as total_fee, avg(tx_fee) as average_fee from a group by 1
    Run a query to Download Data