Eman-RazTop 20 Contracts Based on Transactions Count
    Updated 2023-04-13
    with tab1 as (select distinct receiver_id as 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 >= '2022-01-01'
    group by 1)
    select distinct tx_receiver as "New Contract", count(distinct tx_hash) as "TXs Count"
    from near.core.fact_transactions where tx_receiver in (select * from tab1)

    group by 1
    order by 2 desc
    limit 20
    Run a query to Download Data