select count(distinct TX_ID) as num_tx,sum(FEE) as sum_fee ,avg(FEE) as avg_fee ,TX_TYPE_NAME,
date_trunc('day', block_timestamp) as block_day
from flipside_prod_db.algorand.transactions
where block_day >= '2022-06-01'
group by block_day,TX_TYPE_NAME