0xHaM-dAverage
    Updated 2023-01-12
    with total as (
    SELECT
    'TERRALUNA2.0 Gov' as chain,
    COUNT(DISTINCT tx_id) as votes,
    COUNT(DISTINCT VOTER) as voters,
    COUNT(DISTINCT PROPOSAL_ID) as propsals,
    sum(VOTE_WEIGHT) as vote_height
    FROM terra.core.fact_governance_votes
    WHERE VOTE_WEIGHT is not null
    GROUP by 1
    UNION
    SELECT
    'COSMOS Gov' as chain,
    COUNT(DISTINCT tx_id) as votes,
    COUNT(DISTINCT VOTER) as voters,
    COUNT(DISTINCT PROPOSAL_ID) as propsals,
    sum(VOTE_WEIGHT) as vote_height
    FROM cosmos.core.fact_governance_votes
    WHERE VOTE_WEIGHT is not null
    AND BLOCK_TIMESTAMP >= '2022-01-01'
    GROUP by 1
    UNION
    SELECT
    'OSMOSIS Gov' as chain,
    COUNT(DISTINCT tx_id) as votes,
    COUNT(DISTINCT VOTER) as voters,
    COUNT(DISTINCT PROPOSAL_ID) as propsals,
    sum(VOTE_WEIGHT) as vote_height
    FROM osmosis.core.fact_governance_votes
    WHERE VOTE_WEIGHT is not null
    AND BLOCK_TIMESTAMP >= '2022-01-01'
    GROUP by 1
    Run a query to Download Data