binhachonCopy of [Hard] Apollo Inflow: Total UST borrowed from Anchor
    Updated 2021-11-11
    select
    date(block_timestamp) as block_date,
    sum(msg_value:execute_msg:borrow_stable:borrow_amount) / pow(10, 6) as borrowed_amount
    from terra.msgs
    where msg_value:execute_msg:borrow_stable is not null
    and tx_status = 'SUCCEEDED'
    and block_date > '2021-09-01T00:00:00Z'
    -- and,'2021-09-14T00:00:00Z', '2021-09-15T00:00:00Z', '2021-09-16T00:00:00Z')
    group by 1
    Run a query to Download Data