StangFASToverview chart
    Updated 2023-06-27
    -- forked from overview @ https://flipsidecrypto.xyz/edit/queries/c90fd088-0bf7-43eb-b4a8-d620d28d2468

    -- forked from overview @ https://flipsidecrypto.xyz/edit/queries/d5884a8b-7951-47e4-81fd-98828d5ed07d

    -- forked from 01 @ https://flipsidecrypto.xyz/edit/queries/6b4d366b-91ba-452a-9497-1bbc059cbb00

    with

    near_price AS
    (
    SELECT
    date_trunc( 'day' , a.timestamp ) AS day
    , avg( a.price_usd ) AS price
    , a.symbol AS token
    FROM
    near.core.fact_prices a
    WHERE
    a.symbol LIKE 'wNEAR'
    GROUP BY 1 , 3
    ORDER BY 1 DESC
    )
    ,
    horizon AS
    (
    SELECT
    date_trunc( '{{period}}' , b.block_timestamp ) AS date
    , count( DISTINCT a.signer_id ) AS users
    FROM
    near.social.fact_decoded_actions a
    JOIN
    near.horizon.fact_decoded_actions b
    ON a.signer_id = b.signer_id
    WHERE
    date <= dateadd( '{{period}}' , -1 , current_date )
    GROUP BY 1
    ORDER BY 1 DESC
    Run a query to Download Data