with tx_usd as(
select
date_trunc('day', block_timestamp) as date
, count(tx_id) as tx_count
, sum(amount_usd) as usd_amount
from terra.transfer_events
where sender_address_label = 'astroport'
or recipient_label = 'astroport'
group by 1
order by 1 asc
)
select * from tx_usd
where date <= CURRENT_DATE - INTERVAL '1 DAY'
order by date asc