Moetergov5
Updated 2023-01-23
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with raw as ( select
*,row_number()over(partition by voter order by BLOCK_TIMESTAMP asc ) as n
from terra.core.fact_governance_votes
)
select
iff(n=1,'first time voter' , 'other') as type ,
VOTE_OPTION_TEXT,
count (distinct tx_id) as Votes_Count,
count (distinct voter) as Voters_Count
from raw
where TX_SUCCEEDED = 'TRUE'
and proposal_id = '3795'
group by 1,2
order by 3 desc
Run a query to Download Data