rezarwzDaily Launching in past x days
    Updated 2024-06-28
    -- forked from Daily Launching @ https://flipsidecrypto.xyz/edit/queries/d515fb3b-3ada-4eda-9903-c2bb9ecc5b3a
    with all_launch as (
    SELECT
    ev.TX_ID,
    ev.BLOCK_TIMESTAMP,
    SIGNERS [0] as signer_id,
    INNER_INSTRUCTION:instructions [0] :parsed:info:newAccount :: string as token_mint_id,
    INNER_INSTRUCTION:instructions [2] :parsed:info:newAccount :: string as sol_owner
    FROM
    solana.core.fact_events ev
    WHERE
    program_id = 'degenhbmsyzLpJUwwrzjsPyhPNvLurBFB4k1pBWSoxs'
    and INNER_INSTRUCTION:instructions [0] :parsed:type :: string = 'createAccount'
    and INNER_INSTRUCTION:instructions [1] :parsed:type :: string = 'initializeMint2'
    and SUCCEEDED = 'TRUE'
    and block_Timestamp >= '2024-05-17 01:15:51.000'
    and block_timestamp >= TIMESTAMPADD(
    day,
    - {{past_x_days}},
    CURRENT_TIMESTAMP
    )
    ),
    launch_final as (
    SELECT
    al.TX_ID,
    al.BLOCK_TIMESTAMP,
    signer_id,
    token_mint_id,
    sol_owner,
    AMOUNT
    from
    solana.core.fact_transfers tr
    INNER join all_launch al on tr.tx_id = al.tx_id
    where
    tr.tx_id in (
    SELECT
    QueryRunArchived: QueryRun has been archived