TheLaughingMantokens_deployed fact_events
    Updated 2025-05-12
    -- forked from tokens_deployed fact_events (by index sub_type) @ https://flipsidecrypto.xyz/studio/queries/ed733a29-643f-4bb8-94fe-b298db809705

    SELECT
    -- *
    block_timestamp::date as ddate
    , COUNT(tx_id) as txns
    , COUNT(DISTINCT SIGNERS[0]) as creators
    , COUNT(inner_instruction:instructions[3]:parsed:info:mint) as tokens_created
    , SUM(tokens_created) OVER (ORDER BY ddate ASC) as total_tokens_created
    , MAX(tx_id) as sample_tx
    , MAX(inner_instruction:instructions[3]:parsed:info:mint) as token_sample1
    , MIN(inner_instruction:instructions[3]:parsed:info:mint) as token_sample2
    from solana.core.fact_events
    WHERE 1=1
    AND block_timestamp>='2024-01-01'
    AND program_id = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'
    --AND index IN (1,2) --create event index //index seems to be random as fok
    AND inner_instruction:instructions[3]:programId = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'
    AND inner_instruction:instructions[3]:parsed:type = 'create'
    AND succeeded
    GROUP BY 1
    ORDER BY 1 DESC


    -- SELECT
    -- *
    -- from solana.core.fact_events
    -- WHERE 1=1
    -- AND block_timestamp>='2024-01-01'
    -- AND program_id = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'
    -- --AND index=2 --create event index
    -- --AND event_type = 'create'
    -- AND index!=2
    -- AND inner_instruction:instructions[3]:programId = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'
    -- AND inner_instruction:instructions[3]:parsed:type = 'create'
    -- --AND succeeded
    QueryRunArchived: QueryRun has been archived