SocioCryptoNew Development Periods
    Updated 2023-04-20
    SELECT CASE WHEN first_txn::date BETWEEN '2021-12-01' AND '2021-12-31' THEN 'P1'
    WHEN first_txn::date BETWEEN '2022-12-01' AND '2022-12-31' THEN 'P2'
    END as periods,
    COUNT(receiver_id) as P1_active_contracts
    FROM (select receiver_id,
    min(x.block_timestamp) as first_txn
    FROM near.core.fact_actions_events x
    LEFT JOIN near.core.fact_receipts y
    ON x.tx_hash=y.tx_hash
    WHERE action_name = 'DeployContract'
    group by receiver_id)
    WHERE first_txn BETWEEN '2021-12-01' AND '2021-12-31' OR first_txn BETWEEN '2022-12-01' AND '2022-12-31'
    GROUP BY periods

    Run a query to Download Data