Updated 2021-11-11
    with proposal as (select proposal_id,
    case when proposal_type = 'gov/TextProposal' then 'text'
    else 'standard'
    end as proposal_type
    from terra.gov_submit_proposal
    group by 1,2),

    vote as (select proposal_id, count(tx_id) as number_voter
    from terra.gov_vote
    where tx_status = 'SUCCEEDED'
    group by 1)

    select A.proposal_type, sum(B.number_voter) as total_vote
    from proposal A
    join vote B on A.proposal_id = B.proposal_id
    group by 1
    Run a query to Download Data