CryptoLionCopy of comp crash
    Updated 2021-06-14
    WITH a as (
    SELECT
    date_trunc('day',block_timestamp) as day,
    borrower,
    liquidation_amount_usd
    FROM compound.liquidations
    WHERE block_timestamp >= '2021-02-22' AND block_timestamp <= '2021-02-24'
    HAVING day = '2021-02-22'
    ORDER BY 1)

    SELECT
    date_trunc('day',block_timestamp) as day,
    supplier,
    supplied_base_asset_usd
    FROM compound.deposits d
    INNER JOIN a on a.borrower = d.supplier
    WHERE block_timestamp >= '2021-02-22' AND block_timestamp <= '2021-03-22'
    ORDER BY 1
    Run a query to Download Data