nitsGovernance Voting Period 2 decisions
Updated 2022-02-11
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
›
⌄
WITH exi as(SELECT distinct address as users_
from algorand.account
where account_closed='FALSE'),
gov1 as (select *
from algorand.payment_transaction
where receiver = '57QZ4S7YHTWPRAM3DQ2MLNSVLAQB7DTK4D7SUNRIEFMRGOU7DMYFGF55BY')
, all_votes as
(select *, case when contains(vote, 'a') then 'a' else 'b' end as voted_at
from
(select * ,substring(TRY_BASE64_DECODE_STRING(tx_message:txn:note),10 ) as vote from gov1
where not contains(vote, 'com') and vote is not NULL)
where contains(vote, '5'))
select voted_at, count(sender) as number_of_votes from
(select * from (select max(block_id) as last_vote_time,sender as s, voted_at as v
from all_votes
group by sender, voted_at )
inner join all_votes
on s =sender and v=voted_at)
group by voted_at
--where tx_id = 'NIGFDSGG5QS6MMTUQZ6QYSAXXZI4ZOUNIO5MUO6NDMLFGZFT2TJQ' TRY_BASE64_DECODE_STRING
limit 100
Run a query to Download Data