StangFASTtransactions
    Updated 2023-10-25
    -- forked from active day @ https://flipsidecrypto.xyz/edit/queries/1ade6981-ffa3-46b5-ae27-b4df8540c65e

    -- forked from new and old user @ https://flipsidecrypto.xyz/edit/queries/9a67bdf8-8720-47e1-80de-9f8f4a8c85de

    -- forked from 01 - ov - charts @ 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.core.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.core.fact_hourly_token_prices a
    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )
    ,
    min_date2 AS
    (
    Run a query to Download Data