tlucboy777Getting Started
Updated 2024-04-21
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
›
⌄
-- SELECT
-- d.DEPOSITOR_ADDRESS AS `address`,
-- d.SYMBOL AS `asset`,
-- (
-- SUM(d.ISSUED_TOKENS)
-- - SUM(COALESCE(w.WITHDRAWN_TOKENS, 0))
-- - SUM(COALESCE(l.LIQUIDATED_AMOUNT, 0))
-- ) AS `liquidity_provided`
-- FROM
-- ethereum.aave.ez_deposits d
-- LEFT JOIN
-- ethereum.aave.ez_withdraws w ON d.DEPOSITOR_ADDRESS = w.DEPOSITOR_ADDRESS AND d.SYMBOL = w.SYMBOL
-- JOIN
-- ethereum.core.dim_contracts c ON d.SYMBOL = c.SYMBOL
-- LEFT JOIN
-- ethereum.aave.ez_market_stats ms ON c.ADDRESS = ms.ATOKEN_ADDRESS
-- LEFT JOIN
-- ethereum.aave.ez_liquidations l ON d.DEPOSITOR_ADDRESS = l.BORROWER AND d.SYMBOL = l.COLLATERAL_ASSET
-- GROUP BY
-- d.DEPOSITOR_ADDRESS, d.SYMBOL
-- SELECT
-- d.DEPOSITOR_ADDRESS AS `address`,
-- d.SYMBOL AS `asset`,
-- (
-- SUM(d.ISSUED_TOKENS)
-- - SUM(COALESCE(w.WITHDRAWN_TOKENS, 0))
-- - SUM(COALESCE(l.LIQUIDATED_AMOUNT, 0))
-- ) AS `liquidity_provided`
-- FROM
-- ethereum.aave.ez_deposits d
SELECT
d.depositor_address,
d.aave_version,
d.aave_market,
c.symbol,
QueryRunArchived: QueryRun has been archived