CryptoLioncomp 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-05-18' AND block_timestamp <= '2021-05-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-05-22'
    ORDER BY 1