rahoTotal Votes Cast by Proposal-stgtable
Updated 2023-04-13
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
25
26
27
28
29
30
31
32
33
34
35
›
⌄
-- all snapshots with outcome
with all_ss as (
select
date_trunc('day', proposal_start_time) as start_date,
proposal_title,
voter,
vote_option,
voting_power
from ethereum.core.ez_snapshot
where space_id = 'stgdao.eth'
),
ex_proposal as(
select
start_date,
proposal_title,
voter,
vote_option,
voting_power
from all_ss
order by voting_power asc
)
select
start_date as "Start Date",
proposal_title as "Proposal Title",
count(voter) as "Number of Voters",
sum(voting_power) as "Total Voting Power",
max(voting_power) as "Max Voting Power",
min(voting_power) as "Minimum Voting Power",
avg(voting_power) as "Average Voting Power",
median(voting_power) as "Median Voting Power"
from ex_proposal
group by proposal_title, start_date
order by start_date desc
Run a query to Download Data