StangFASTbase 2023 part 2
    Updated 2023-10-20
    --- create -> create new name
    --- if tx_to -> 'GcWEQ9K78FV7LEHteFVciYApERk5YvQuFDQPk1yYJVXi' get only truely transfer

    --- claim -> claim name [ bid won ]
    --- if tx_to not to 'GcWEQ9K78FV7LEHteFVciYApERk5YvQuFDQPk1yYJVXi' get only truely transfer
    --- resell -> sell

    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
    )

    SELECT
    a.block_timestamp AS tms
    , a.tx_id AS txi
    , a.signers[0] AS sgn
    , trim( split( b.value, ':' ) [2] ) AS act
    , d.amount AS amt
    , d.amount * f.price AS usd
    , f.symbol AS smb
    , d.tx_to AS rcv
    FROM
    solana.core.fact_transactions a

    JOIN
    lateral flatten (input => a.log_messages) b
    Run a query to Download Data