cheeyoung-kekMakerDao 6
Updated 2022-09-06
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
›
⌄
with
symbol as(
select
address,address_name
from ethereum.core.dim_labels
where label='aave'
),
total_deposit as(
SELECT
block_timestamp::date as day,
case when symbol like '0x%' then address_name else symbol end as symbol,
count (tx_id) as tx_count,
count (distinct depositor_address) as depositors,
sum (SUPPLIED_USD) as total_usd,
sum (total_usd) over (order by day) as cum_usd,
sum (depositors) over (order by day) as cum_dep,
sum (tx_count) over (order by day) as cum_tx_count
from flipside_prod_db.aave.deposits a
left outer join symbol b
on a.symbol=b.address
where SYMBOL <> 'REP'
group by 1,2
order by 1
),
total_withdrawal as(
Run a query to Download Data