Updated 2022-02-21
    SELECT
    distinct sum(event_attributes:borrow_amount/1e6), date(block_timestamp) as date
    FROM terra.msg_events
    WHERE
    event_attributes:action = 'borrow_stable' and
    tx_status = 'SUCCEEDED'
    and block_timestamp ::date > DATEADD(month, -3, CURRENT_DATE)
    and event_attributes:contract_address = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
    group by date

    Run a query to Download Data