binhachon80. [Elite] Historic bAssets Price Movements - bLUNA from oracle
    Updated 2021-12-10
    WITH A AS (select BLOCK_TIMESTAMP, TX_ID, MSG_VALUE:"execute_msg":"feed_price":"prices"[0][0]::STRING AS ADDRESS, MSG_VALUE:"execute_msg":"feed_price":"prices"[0][1]::FLOAT AS PRICE from terra.msgs
    where BLOCK_TIMESTAMP >= '2021-12-09T10:00:00Z'
    and BLOCK_TIMESTAMP <= '2021-12-09T23:00:00Z'
    and MSG_MODULE = 'wasm'
    and TX_STATUS = 'SUCCEEDED'
    and MSG_VALUE:"contract"::string = 'terra1cgg6yef7qcdm070qftghfulaxmllgmvk77nc7t'
    and MSG_VALUE:"execute_msg":"feed_price":"prices" IS NOT NULL
    order by BLOCK_TIMESTAMP)
    SELECT time_slice(BLOCK_TIMESTAMP, 30, 'SECOND', 'START') as "START OF SLICE",
    time_slice(BLOCK_TIMESTAMP, 30, 'SECOND', 'END') as "END OF SLICE",
    ADDRESS, AVG(PRICE)
    FROM A
    where address = 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp'
    GROUP BY "START OF SLICE", "END OF SLICE", ADDRESS
    ORDER BY "START OF SLICE"

    Run a query to Download Data