-- https://app.flipsidecrypto.com/dashboard/terra-152-anchor-emissions-ImZ2Zt
select date_trunc('hour', block_timestamp) as date, count(distinct sender) as borrowers, sum(amount) as amount, count(DISTINCT tx_id) as transactions
from anchor.borrows
where block_timestamp::date >= CURRENT_DATE::date - 10
group by date
order by date