with final_data as (
select
blockchain, transfer_type,
count(*) as total_count,
sum(AMOUNT/1e6) as volume
from terra.core.ez_transfers
where CURRENCY='uluna' and
to_date(block_timestamp) >='2023-01-09' and
to_date(block_timestamp) >='2023-01-07' and
to_date(block_timestamp) <='2023-01-13'
group by blockchain, transfer_type
)
select * from final_data