kingharald-ethTotal Number of Smart Contracts on Near Since Inception
    Updated 2022-08-03
    with list as (
    select tx_receiver as address, count(distinct(tx_hash)) as tx_num from near.core.fact_transactions
    group by address

    UNION ALL

    select tx_signer as address, count(distinct(tx_hash)) as tx_num from near.core.fact_transactions
    group by tx_signer
    )

    select count(distinct(address)) as smart_contract_addresses from (
    select address, sum(tx_num) as total_tx_num from list
    group by address
    having total_tx_num >= 100000
    )
    Run a query to Download Data