CryptoIcicle142. Quis Custodiet Ipsos Custodies? - Voting History
    Updated 2022-02-02
    -- Flipside conducted a Community Call in December 2021 to discuss Validator transparency.
    -- It is clear from that call that potential delegators would benefit from metrics
    -- and behaviors that are not currently public or easily accessible to Terra users.

    -- In that spirit, we would like your input to determine what metrics could go into a public view of Validator behaviors.

    -- For this bounty, suggest the 3 most important such metrics, produce them for the current validators on Terra,
    -- and explain how they would be interpreted/used by potential delegators.

    -- Payout 5.51 LUNA
    -- Grand Prize 16.53 LUNA
    -- Level Advanced

    -- Voting History
    -- Community Proposals
    -- Validator Donations


    with voting as (
    select * from (
    select
    block_timestamp,
    proposal_id,
    option as vote,
    voter_address_label,
    rank() over (partition by voter_address_label, proposal_id order by block_timestamp desc ) as rank -- Count vote only once
    from terra.gov_vote
    where voter_address_label <> ''
    order by proposal_id, block_timestamp
    ) where rank = 1
    ),

    top_10 as (
    select
    voter_address_label,
    count(distinct(proposal_id)) as n_votes
    Run a query to Download Data