rain_syndicaMonthly Trend for Solana Token Launches in 2022
    Updated 2023-05-19
    WITH all_launched_tokens AS (
    SELECT
    swap_to_mint AS token,
    block_timestamp,
    tx_id
    FROM solana.core.fact_swaps
    WHERE block_timestamp <= '2022-12-31'
    AND succeeded = TRUE
    QUALIFY first_value(tx_id) over (partition by swap_to_mint order by block_timestamp) = tx_id
    ),

    launched_tokens AS (
    SELECT a.token, b.label, b.address_name
    FROM all_launched_tokens a LEFT JOIN solana.core.dim_labels b
    ON a.token = b.address
    WHERE
    block_timestamp >= '2022-01-01'
    AND block_timestamp <= ' 2022-12-31'
    )

    SELECT
    date_trunc(month, block_timestamp) AS month,
    COUNT(DISTINCT token) AS num_tokens_launched
    FROM all_launched_tokens
    WHERE token IN (SELECT token FROM launched_tokens)
    GROUP BY month
    ORDER BY month