select
date_trunc('day',block_timestamp) as day,
count(case when swap_from_asset_id = 694432641 then 1 end) as swap_from_trades,
count(case when swap_to_asset_id = 694432641 then 1 end) as swap_to_trades
from algorand.swaps
where day >= current_date -30
group by day