SocioCryptoGeneral Stat. - Liquidation on AAVE
    Updated 2023-07-13
    SELECT
    date_trunc('{{interval}}', block_timestamp) as date,
    count(DISTINCT tx_hash) as n_liquidations,
    count(DISTINCT borrower) as n_liquidated_wallet,
    avg(liquidated_amount_usd) as avg_liquidated_amnt_usd,
    sum(liquidated_amount_usd) as total_liquidated_amnt_usd
    FROM
    ethereum.aave.ez_liquidations
    WHERE
    date <= CURRENT_DATE -1
    GROUP BY
    date
    Run a query to Download Data