SELECT
trunc(block_timestamp,'week') as month,
case when tx_succeeded='true' then 'Succeeded' else 'Failed' end as type,
count(distinct tx_id) as total_transactions
from flow.core.fact_transactions x
--where month<trunc(current_date,'week')
group by 1,2
order by 1 asc