select 'Past Month' as type,
date_trunc('day',block_timestamp) as date,
count(*)/(24*3600) as TX_Count
From solana.core.fact_transactions
Where block_timestamp::date >= CURRENT_DATE - 30
AND succeeded = 'TRUE'
group by 2
union all
select 'Rest Of The Year' as type,
date_trunc('day',block_timestamp) as date,
count(*)/(24*3600) as TX_Count
From solana.core.fact_transactions
Where block_timestamp::date >= '2022-01-01' and block_timestamp::date < CURRENT_DATE - 30
AND succeeded = 'TRUE'
group by 2
order by 2