tlucboy777Getting Started
    Updated 2024-04-21
    -- 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