with trade_from as (select block_timestamp::date as day,
count(tx_group_id) as tx_from,
sum(swap_from_amount) as amount_from
from algorand.swaps
where swap_from_asset_id = '694432641'
group by 1),
trade_to as (select block_timestamp::date as day,
count(tx_group_id) as tx_to,
sum(swap_to_amount) as amount_to
from algorand.swaps
where swap_to_asset_id = '694432641'
group by 1)
select a.day, a.tx_from, b.tx_to, a.amount_from, b.amount_to
from trade_from a
full outer join trade_to b
on a.day = b.day
order by 1