LTirrell 2022-01-28_luna_anchor-other
Updated 2022-02-02
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 borrows as (
select
date_trunc('day', block_timestamp) as datetime,
sum(amount_usd) as total_amount,
avg(amount_usd) as avg_amount
from
anchor.borrows
-- where
-- datetime >= '2021-11-03'
group by
datetime
),
repay as (
select
date_trunc('day', block_timestamp) as datetime,
sum(amount_usd) as total_amount,
avg(amount_usd) as avg_amount
from
anchor.repay
-- where
-- datetime >= '2021-11-03'
group by
datetime
),
deposits as (
select
date_trunc('day', block_timestamp) as datetime,
sum(deposit_amount_usd) as total_amount,
avg(deposit_amount_usd) as avg_amount
from
anchor.deposits
-- where
-- datetime >= '2021-11-03'
group by
datetime
),
Run a query to Download Data