/ Fork of (#6976) Aave - Monthly Borrow Volume per Asset @johaya
About queries and results
Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.
We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.
Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.
SQL query results
SQL query
1WITH borrows AS
2(
3SELECT
4date_trunc('month', evt_block_time) as month,
5t.symbol as token,
6sum("_amount"/10^decimals) as amount
7FROM aave."LendingPool_evt_Borrow" borrows
8LEFT JOIN erc20."tokens" t ON borrows."_reserve" = t.contract_address
9GROUP BY 1,2
10)
11,
12
13p AS
14(
15SELECT
16*
17FROM prices.usd
18)
19
20SELECT
21month,
22token,
23amount,
24price,
25amount*price As USDvalue
...