Haisenberglateral-flatten-test-run
    Updated 2023-10-29
    SELECT
    date_trunc('week', block_timestamp) :: date AS date,
    instructions [0] ['programId'] AS to_address,
    count(DISTINCT s.value) AS active_addresses,
    count(tx_id) AS active_transactions
    FROM
    solana.core.fact_transactions,
    LATERAL FLATTEN(signers) AS s
    WHERE
    succeeded = 'true'
    AND block_timestamp :: date >= '2023-09-18'
    AND block_timestamp :: date < '2023-09-25'
    AND to_address IS NOT NULL
    GROUP BY
    1,
    2;


    SELECT
    date_trunc('week', block_timestamp) :: date AS date,
    instructions

    FROM
    solana.core.fact_transactions,
    LATERAL FLATTEN(instructions)











    Run a query to Download Data