primo_dataAave - 6. Aave User Dashboard
Updated 2022-08-12
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- Aave - 6. Aave User Dashboard
-- Create a dashboard that allows a viewer to input a user address and explore their borrowing and lending activity.
-- Include metrics like total origination, loan revenue, outstanding debt, etc.
/* with supplied as (
select block_timestamp
, blockchain
, tx_id
, aave_version
, symbol token
, 'supplied' typ
, supplied_usd total_amount_usd
, depositor_address address
from flipside_prod_db.aave.deposits
where block_timestamp > current_date - 10
),
withdrawn as (
select block_timestamp
, blockchain
, tx_id
, aave_version
, symbol token
, 'withdrawn' typ
, -withdrawn_usd total_amount_usd
, depositor_address address
from flipside_prod_db.aave.withdraws
where block_timestamp > current_date - 10
),
borrowed as (
select block_timestamp
, blockchain
, tx_id
, aave_version
, symbol token
, 'borrow' typ
Run a query to Download Data