MLDZMNCoG5
    Updated 2023-01-12
    with tb1 as (select
    'Cosmos' as network,
    VOTER,
    count(distinct PROPOSAL_id) as no_proposals
    from cosmos.core.fact_governance_votes
    where TX_SUCCEEDED = 'TRUE'
    group by 1,2
    union all
    select
    'Osmosis' as network,
    VOTER,
    count(distinct PROPOSAL_id) as no_proposals
    from osmosis.core.fact_governance_votes
    where TX_SUCCEEDED = 'TRUE'
    group by 1,2
    union all
    select
    'Terra' as network,
    VOTER,
    count(distinct PROPOSAL_id) as no_proposals
    from terra.core.fact_governance_votes
    where TX_SUCCEEDED = 'TRUE'
    group by 1,2)

    select
    Network,
    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 and no_proposals<30 then '10-30 proposals'
    when no_proposals>=30 then 'Over 30 proposals'
    end as gp,
    count(distinct voter) as no_voter
    from tb1
    group by 1,2 having gp is not null
    Run a query to Download Data