i_dancrude-gold even 2024 Q1
    Updated 2025-04-29
    WITH firsta AS (
    SELECT
    date_trunc('month', block_timestamp) AS Month
    -- , tx_id
    -- , event_type
    -- , program_id
    , COUNT(DISTINCT TRIM(REPLACE(f.value::string, '"', ''))) AS wallet_address
    FROM solana.core.fact_transactions d --solana.core.fact_transactions
    JOIN LATERAL FLATTEN(INPUT => d.signers) f
    WHERE date_trunc('month', block_timestamp) = '2024-06-01'
    GROUP BY 1

    UNION ALL

    SELECT
    date_trunc('month', block_timestamp) AS Month
    -- , tx_id
    -- , event_type
    -- , program_id
    , COUNT(DISTINCT TRIM(REPLACE(f.value::string, '"', ''))) AS wallet_address
    FROM solana.core.fact_transactions d --solana.core.fact_transactions
    JOIN LATERAL FLATTEN(INPUT => d.signers) f
    WHERE date_trunc('month', block_timestamp) = '2024-04-01'
    GROUP BY 1

    UNION ALL

    SELECT
    date_trunc('month', block_timestamp) AS Month
    -- , tx_id
    -- , event_type
    -- , program_id
    , COUNT(DISTINCT TRIM(REPLACE(f.value::string, '"', ''))) AS wallet_address
    FROM solana.core.fact_transactions d --solana.core.fact_transactions
    JOIN LATERAL FLATTEN(INPUT => d.signers) f
    WHERE date_trunc('month', block_timestamp) = '2024-02-01'
    Last run: about 1 month ago
    MONTH
    WALLET_ADDRESS
    1
    2024-06-01 00:00:00.00029537198
    2
    2024-04-01 00:00:00.00020408575
    3
    2024-02-01 00:00:00.00022816988
    3
    112B
    495s