StangFASTuser behavior part 2
    Updated 2023-10-26
    with

    price AS
    (
    SELECT
    date_trunc( 'day' , a.recorded_hour ) AS date
    , avg( a.close ) AS price
    , a.symbol AS symbol
    , a.token_address AS address

    FROM
    solana.price.ez_token_prices_hourly a

    GROUP BY 1 , 3 , 4
    ORDER BY 1 DESC
    )
    ,
    min AS
    (
    SELECT
    min( a.block_timestamp ) AS min_date
    , a.signers[0] AS new_user

    FROM
    solana.core.fact_events a
    WHERE
    a.block_timestamp::date >= '2023-02-01'
    AND a.program_id = 'Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j'
    AND a.succeeded = 'true'
    GROUP BY 2
    ORDER BY 1 DESC
    )
    ,
    final AS
    (
    Run a query to Download Data