select sum (swap_from_amount) as swap_from_volume,
date_trunc('month', block_timestamp) as DATE,
CASE
when swap_from_asset_id = '31566704' THEN 'USDC'
when swap_from_asset_id = '312769' THEN 'USDT'
when swap_from_asset_id = '465865291' THEN 'STBL'
end as stable
from flipside_prod_db.algorand.swaps
where SWAP_FROM_ASSET_ID in ('31566704', '312769', '465865291')
group by DATE, stable