CryptoLionliquidations -
    Updated 2021-05-10
    SELECT
    day,
    borrowers,
    borrowers_liquidated
    FROM (SELECT
    date_trunc('day',compound.liquidations.block_timestamp) as day,
    listagg(compound.liquidations.borrower,':') as borrowers_liquidated
    FROM compound.liquidations
    WHERE
    compound.liquidations.block_timestamp >= getdate() - interval '1 week')
    JOIN
    (SELECT
    date_trunc('day',compound.borrows.block_timestamp),
    listagg(DISTINCT compound.borrows.borrower,':') as borrowers
    FROM compound.borrows
    WHERE
    compound.borrows.block_timestamp >= getdate() - interval '1 week')
    ON date_trunc('day',compound.borrows.block_timestamp) = date_trunc('day',compound.liquidations.block_timestamp)
    GROUP BY day
    ORDER BY day
    Run a query to Download Data