mlhUntitled Query
    Updated 2022-08-02
    with contracts as (
    SELECT *
    from (SELECT min(a.BLOCK_TIMESTAMP) as dates,
    RECEIVER_ID
    from near.core.fact_actions_events a
    join near.core.fact_receipts b on a.TX_HASH = b.TX_HASH
    where ACTION_NAME= 'DeployContract'
    GROUP by 2
    )
    where dates >= '2022-01-01'
    )
    SELECT TX_RECEIVER as contract,
    COUNT(DISTINCT TX_HASH) as txs,
    COUNT(DISTINCT TX_SIGNER) as signers
    from near.core.fact_transactions
    where date(BLOCK_TIMESTAMP) >= '2022-01-01'
    and TX_RECEIVER in (
    SELECT RECEIVER_ID
    from contracts
    )
    GROUP by 1
    ORDER by 2 DESC
    limit 10
    Run a query to Download Data