WatchmenTop 20 Channels/Groups
    Updated 2024-12-07
    with og_casts as (
    select
    *
    from
    external.farcaster.fact_casts
    where
    parent_fid is null
    )
    ,

    lables as (
    select
    CASE
    when (
    root_parent_url LIKE '%channel%'
    OR root_parent_url LIKE '%group%'
    ) then root_parent_url
    else 'root'
    end as channel,
    count(DISTINCT id) as casts
    from
    og_casts
    group by
    channel
    )
    select
    *
    from
    lables
    order by
    casts desc
    LIMIT 20
    QueryRunArchived: QueryRun has been archived