select date_trunc('day', block_timestamp) as block_day ,
sum(SWAP_FROM_AMOUNT ) as swap_amount ,swap_program
from flipside_prod_db.algorand.swaps
where block_timestamp >= '2022-04-01'
and swap_program in ('tinyman','algofi','pactfi')
and SWAP_FROM_ASSET_ID = 0
group by swap_program,block_day
order by swap_amount desc