KaskoazulSolana New Users - Total transactions 24h
    Updated 2022-02-13
    WITH FIRST_TRANSACTION AS(
    SELECT
    tx_from_address as new_user,
    min(block_timestamp) as creation_date
    FROM
    solana.transactions
    WHERE succeeded = 'TRUE'
    GROUP BY 1
    ),

    TRANSACTIONS_24h AS(
    SELECT
    FIRST_TRANSACTION.new_user,
    FIRST_TRANSACTION.creation_date,
    t.tx_id
    FROM
    FIRST_TRANSACTION
    INNER JOIN solana.transactions t
    ON t.tx_from_address = FIRST_TRANSACTION.new_user AND t.block_timestamp > FIRST_TRANSACTION.creation_date AND t.block_timestamp <= FIRST_TRANSACTION.creation_date + INTERVAL '1 DAY'
    WHERE
    creation_date >= '2022-02-01'
    )--,

    --TRANSACTIONS_PER_USER AS(
    SELECT
    sum(1) as Total_transactions
    FROM
    TRANSACTIONS_24H
    --)

    --SELECT
    --AVG(Transactions_per_user)
    --FROM
    --TRANSACTIONS_PER_USER

    Run a query to Download Data