kimkimNew NEAR Smart Smart Contracts per day
    Updated 2022-08-03
    with link as
    (select
    PERMISSION:FunctionCall:receiver_id as contract,
    count(tx_hash) as trans
    FROM near.core.fact_actions_events_addkey
    where PERMISSION:FunctionCall:receiver_id is not null
    group by 1
    having trans > 1)


    select
    count(id),
    days
    from
    (select
    distinct PERMISSION:FunctionCall:receiver_id as id,
    min(date_trunc('day', block_timestamp)) days
    from flipside_prod_db.mdao_near.actions_events_addkey
    where PERMISSION:FunctionCall:receiver_id in (select contract from link)
    and block_timestamp >= '2021-09-01'

    group by 1)
    group by 2


    Run a query to Download Data