adriaparcerisasNear new contracts
    Updated 2023-04-19
    SELECT
    trunc(first_date,'day') as date,
    count(distinct receiver_id ) as new_contracts,
    sum(new_contracts) over (order by date) as cum_new_contracts
    from (select
    receiver_id,
    min(x.block_timestamp) as first_date
    from near.core.fact_actions_events x
    join near.core.fact_receipts y on x.tx_hash=y.tx_hash
    where action_name = 'DeployContract'
    group by 1) where first_date >= CURRENT_DATE - INTERVAL '1 MONTH'
    group by 1
    order by 1 asc
    Run a query to Download Data