LTirrellUntitled Query
    Updated 2021-09-02
    -- SELECT
    -- block_id,
    -- block_timestamp,
    -- tx_id,
    -- msg_value:sender::string as sender,
    -- msg_value:execute_msg:send:amount / POW(10,6) as event_amount,
    -- msg_value:contract::string as token_address,
    -- t.address_name as token_address_name,
    -- msg_value:execute_msg:send:contract::string as contract_address,
    -- c.address_name as contract_address_name
    -- FROM terra.msgs

    -- LEFT OUTER JOIN terra.labels t
    -- ON msg_value:contract = t.address
    -- LEFT OUTER JOIN terra.labels c
    -- ON msg_value:execute_msg:send:contract = c.address
    -- WHERE msg_type = 'wasm/MsgExecuteContract'
    -- AND msg_value:contract = 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp' --bLUNA Token Address
    -- AND msg_value:execute_msg:send:contract = 'terra1ptjp2vfjrwh0j0faj9r6katm640kgjxnwwq9kn' --Anchor bLUNA Custody Contract
    -- -- AND tx_id = 'FFFFE5EA4ABD5E2AC8A697B9EA392CED52BF936891CA1E6DDFC559CBFBC28D5B'
    -- AND block_timestamp >= CURRENT_DATE - 30
    -- ORDER BY block_timestamp DESC
    -- LIMIT 100
    SELECT * from terra.swaps
    LIMIT 10