Query editor
with base_borrow as (select *from query_3957464where blockchain = 'base'-- and action = 'borrow'-- and loan_symbol = 'USDC'-- and borrow_amount_usd < 0-- and time >= date '2025-03-30'-- limit 1000),total_user as (select count(distinct usr) as total_borrowersfrom base_borrowwhere action = 'borrow'and loan_symbol = 'USDC'and borrow_amount_usd > 0)select *,sum(borrows) over (order by month) as total_borrows,sum(borrow_volume) over (order by month) as total_borrow_volume,total_borrowersfrom (selectdate_trunc('month', time) as month,count(distinct usr) as user,count(*) as borrows,sum(borrow_amount_usd) as borrow_volumefrom base_borrowwhere action = 'borrow'and loan_symbol = 'USDC'and borrow_amount_usd > 0group by 1)left join total_useron 1 = 1order by 1 desc