select
date_trunc('day',block_timestamp) as day
, count(distinct tx_id) as swap_count
, sum(offer_amount_usd) as offer_volume_usd
, sum(return_amount_usd) as return_volume_usd
from astroport.swaps
--where
--and block_timestamp >= '2021-12-01'
--and block_timestamp < CURRENT_DATE
group by day
order by day asc