StangFASTbase - 18 - Meteora Vault Program
    Updated 2023-10-03
    --- Meteora Vault Program
    --- 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi

    with

    price AS
    (
    SELECT
    date_trunc( 'day' , a.recorded_hour ) AS date
    , avg( a.close ) AS price
    , a.token_address AS token
    , a.symbol AS symbol
    FROM
    solana.price.ez_token_prices_hourly a
    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )
    ,
    sol AS
    (
    SELECT
    date_trunc( 'day' , a.recorded_hour ) AS date
    , avg( a.close ) AS price
    , a.token_address AS token
    , a.symbol AS symbol
    FROM
    solana.price.ez_token_prices_hourly a
    WHERE
    a.symbol = 'sol'
    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )

    SELECT
    a.block_timestamp AS dt
    , a.tx_id AS tx
    Run a query to Download Data