Moe14 Pessi
    Updated 2023-02-03
    -- sectors by popularity in first transaction
    with base as (select
    rank()over(partition by from_address order by block_timestamp) as n,
    l.LABEL_TYPE as sector ,
    *
    from
    Arbitrum.core.fact_transactions t,Arbitrum.core.dim_labels l
    where to_address = address
    order by from_address , n )

    select
    sector ,
    count(distinct tx_hash) as n_txs
    from base where n = 1
    group by 1
    order by 2 desc
    Run a query to Download Data