FatemeTheLadyTotal Widget Creation
    Updated 2023-03-08
    -- forked from 77b53745-9c00-468e-975c-5b6ecb66ebea

    with widget_creation_list as (
    select
    signer_id,
    key as widget,
    min(block_timestamp) as widget_creations_date
    from near.social.fact_decoded_actions
    join near.core.fact_transactions using(tx_hash),
    table(flatten(input => node_data))
    where node ilike '%widget%'
    and block_timestamp::date<current_date
    group by signer_id, widget
    )

    select
    count(widget) as "Number of Widgets Created",
    count(distinct signer_id) as "Number of Accounts"
    from widget_creation_list


    Run a query to Download Data