jackguyBorrowing activity on Aave 1
Updated 2023-03-09
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
SELECT
*,
sum(borrow_volume_usd) over (partition by symbol order by week) as total_borrow_volume_usd,
sum(borrow_events) over (partition by symbol order by week) as total_borrow_events_usd
FROM (
SELECT
date_trunc('week', block_timestamp) as week,
symbol,
sum(BORROWED_USD) as borrow_volume_usd,
count(DISTINCT tx_hash) as borrow_events,
count(DISTINCT borrower_address) as borrowers
FROM ethereum.aave.ez_borrows
WHERE symbol in ('SNX', 'UNI', 'MKR')
AND aave_version LIKE 'Aave V2'
GROUP BY 1,2
)
Run a query to Download Data