select
proposal_type,
count(distinct voter) as voters_count,
sum(coalesce(vote_weight, 0)) as total_voting_weight
from cosmos.core.fact_governance_votes a
join cosmos.core.fact_governance_submit_proposal b
using(proposal_id)
group by 1
order by 2 desc