StangFASTchange last 7 days
    Updated 2023-09-01
    -- forked from change last 24 @ https://flipsidecrypto.xyz/edit/queries/52291153-a646-400e-9cfa-d00e6ff78f0a

    -- forked from 01 @ https://flipsidecrypto.xyz/edit/queries/782873b3-45aa-4d28-8853-5d47773f49d5

    with

    token_price1 AS
    (
    SELECT
    date_trunc( 'day' , a.hour ) AS day
    , avg( a.price ) AS price
    , a.symbol AS token
    , a.token_address AS token_id
    FROM
    base.price.fact_hourly_token_prices a
    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )
    ,
    token_price2 AS
    (
    SELECT
    date_trunc( 'day' , a.hour ) AS day
    , avg( a.price ) AS price
    , a.symbol AS token
    , a.token_address AS token_id
    FROM
    base.price.fact_hourly_token_prices a
    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )
    --- 2023-08-30 15:00:00.000 last
    --- 2023-08-29 17:00:00.000 first
    ,
    final AS
    (
    Run a query to Download Data