CryptoLionbrians3
Updated 2021-05-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
WITH liquidations as (
SELECT
liquidation_contract_symbol,
SUM(liquidation_amount_usd) as liquidation_amount
FROM compound.liquidations
GROUP BY 1)
, borrowers as (
SELECT
borrows_contract_symbol,
SUM(loan_amount_usd) as loan_amount
FROM compound.borrows
GROUP BY 1)
SELECT
liquidation_contract_symbol,
liquidation_amount,
loan_amount,
liquidation_amount/loan_amount*100 as dollar_probability_liquidation
FROM liquidations
JOIN borrowers ON borrowers.borrows_contract_symbol=liquidations.liquidation_contract_symbol
ORDER BY 4 DESC
Run a query to Download Data