Updated 2024-10-24
    with tb1 as (select
    VOTER,
    count(distinct PROPOSAL_id) as no_proposals
    from lava.gov.fact_votes
    where TX_SUCCEEDED = 'TRUE'
    group by 1
    )

    select
    case
    when no_proposals<3 then 'under 3 proposals'
    when no_proposals>=3 and no_proposals<10 then '3-10 proposals'
    when no_proposals>=10 then 'Over 10 proposals'
    end as gp,
    count(distinct voter) as no_voter
    from tb1
    group by 1 having gp is not null


    QueryRunArchived: QueryRun has been archived