saeedmzn[New accounts on SEI] Total
    Updated 2024-02-05
    with New_users as (
    select TX_FROM ,
    min (BLOCK_TIMESTAMP) ::date min_date
    from sei.core.fact_transactions
    group by 1 having min_date >= current_date - 30

    ),
    transactions as (
    select TX_ID , TX_FROM
    from sei.core.fact_transactions
    where TX_FROM in (select TX_FROM from New_users )
    ),
    labels as (
    select ADDRESS ,
    LABEL,
    LABEL_TYPE
    from sei.core.dim_labels
    ),
    msg as (
    select ATTRIBUTE_VALUE ADDRESS , *
    from sei.core.fact_msg_attributes join transactions using (tx_id)
    -- where ATTRIBUTE_VALUE in (select ADDRESS from labels )
    and BLOCK_TIMESTAMP::date >= current_date - 30
    )
    select
    count (DISTINCT ATTRIBUTE_VALUE) Total_contracts
    from msg join labels using (ADDRESS)


    Last run: about 1 year agoAuto-refreshes every 12 hours
    TOTAL_CONTRACTS
    1
    168
    1
    7B
    72s