CryptoLionLatest Borrows on Anchor
    Updated 2021-07-20
    -- -- On Anchor you can borrow UST against your bonded LUNA (up to 50% of collateral)

    -- SELECT
    -- block_id,
    -- block_timestamp,
    -- tx_id,
    -- msg_value:sender::string as sender,
    -- msg_value:execute_msg:borrow_stable:borrow_amount / POW(10,6) as borrow_amount,
    -- msg_value:contract::string as contract_address,
    -- c.address_name
    -- FROM terra.msgs

    -- LEFT OUTER JOIN terra.labels c
    -- ON msg_value:contract::string = c.address

    -- WHERE msg_value:contract = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
    -- AND msg_value:execute_msg:borrow_stable IS NOT NULL
    -- AND block_timestamp >= CURRENT_DATE - 7
    -- ORDER BY block_timestamp DESC
    -- LIMIT 100

    SELECT
    sum(price_usd),
    FROM terra.reward


    Run a query to Download Data