Updated 2023-03-27
    SELECT
    date_trunc('day',block_timestamp) as day,
    ctoken_symbol,
    count(tx_id) as transactions,
    sum(loan_amount_usd) as value
    FROM compound.borrows
    WHERE block_timestamp >= getdate() - interval '3 months'
    AND (ctoken_symbol = 'cWBTC'
    OR ctoken_symbol = 'cWBTC2')
    GROUP BY day,ctoken_symbol
    ORDER BY day

    Run a query to Download Data