-- forked from monthly direction ratio by bridge @ https://flipsidecrypto.xyz/edit/queries/6c3e35b2-6492-4723-8381-2cbdd07dfff8
select
date_trunc('month', block_timestamp) month,
'blocto' bridge,
direction,
count(distinct tx_id) total_tx
from flow.core.ez_bridge_transactions
where block_timestamp::date >= current_date - 365
and bridge = 'blocto'
and month > '2022-04-01'
group by month, direction
order by month, direction