iboo-jbj2MV Anchor Collateralization
Updated 2022-02-03
999
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 bluna_pr AS
(
SELECT
date_trunc('day', block_timestamp) AS Dt,
CASE WHEN event_type='provide' THEN sum(amount)
END AS Provided_bluna
FROM anchor.collateral
WHERE currency=('terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp') and event_type='provide'
GROUP BY dt, event_type
ORDER BY dt DESC
),
bluna_w AS
(
SELECT
date_trunc('day', block_timestamp) AS Dte,
CASE WHEN event_type='withdraw' THEN SUM(amount)
END AS withdrawed_bluna
FROM anchor.collateral
WHERE currency=('terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp') and event_type='withdraw'
GROUP BY dte, event_type
ORDER BY dte DESC
),
beth_pr AS
(
SELECT
date_trunc('day', block_timestamp) AS Dtt,
CASE WHEN event_type='provide' THEN sum(amount)
END AS Provided_beth
FROM anchor.collateral
WHERE currency=('terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun') and event_type='provide'
GROUP BY dtt, event_type
ORDER BY dtt DESC
),
Run a query to Download Data