HeminAlgorand Governance Period 2 Voting
    Updated 2022-03-22
    with vote as (
    select
    tx_id,
    block_id,
    block_timestamp,
    sender,
    try_base64_decode_string(tx_message:txn:note::string) as note,
    substr(note, position('[', note, 1)) as vote,
    row_number() over (partition by sender order by block_id desc) as rownumber
    from algorand.payment_transaction
    where
    amount is null
    and (note like 'af/gov%')
    AND BLOCK_TIMESTAMP BETWEEN '2022-01-31' and '2022-02-28'
    )

    select block_timestamp::date as day,upper(vote) as final_vote,count(*)
    from vote
    where final_vote != '"' and final_vote != 'F'
    group by 1,2
    order by 1,2
    Run a query to Download Data