winnie-fssimple price query copy
    Updated 2024-09-27
    -- forked from theericstone / simple price query @ https://flipsidecrypto.xyz/theericstone/q/zC3MZqjxuxL2/simple-price-query

    SELECT DISTINCT
    ezp.blockchain,
    ezp.symbol,
    ezp.hour::DATE AS date,
    LAST_VALUE(ezp.price) OVER (
    PARTITION BY ezp.blockchain, ezp.token_address, ezp.hour::date
    ORDER BY ezp.hour ASC
    ) AS price
    FROM crosschain.price.ez_prices_hourly ezp
    WHERE ezp.hour > '2023-10-01'
    AND (
    (ezp.symbol = 'OLAS' AND token_address = '0x0001a500a6b18995b03f44bb040a5ffc28e45cb0')
    OR (ezp.symbol = 'BONK' AND token_address = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263')
    OR (ezp.symbol = 'BLAST'AND token_address = '0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad')
    OR (ezp.symbol = 'LAVA'))
    ORDER BY blockchain, symbol, date desc;


    QueryRunArchived: QueryRun has been archived