hessAverage Fees
    Updated 2023-01-25
    with final as ( select date(block_timestamp) as date, case when date >= '2023-01-15' then 'After Terra Station'
    when date = '2023-01-14' then 'Launch Day' else 'Before Terra Station' end as type, count(DISTINCT(tx_id)) as total_tx,
    count(DISTINCT(TX_SENDER)) as total_user, sum(fee) as total_fee
    from terra.core.fact_transactions
    where date >= CURRENT_DATE - 45 and TX_SUCCEEDED = 'TRUE'
    group by 1,2)

    select type, avg(total_tx) as avg_tx, avg(total_user) as avg_user, avg(total_fee) as avg_fee
    from final
    group by 1
    Run a query to Download Data