pennyhe-SdsILXMakerDAO - 3a. Voter Activity
Updated 2023-12-10
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
›
⌄
-- https://app.flipsidecrypto.com/velocity/queries/61f047b6-bca7-449d-99e1-be4cf208919a
with polls AS (
SELECT
voter,
block_timestamp,
VOTE_OPTION,
tx_hash,
proposal_id as pollid
FROM ethereum.maker.ez_governance_votes
WHERE tx_status ='SUCCESS'
AND tx_hash !='0xf609ea50ec79eee06d58f1a4a215ab78c91f57da9a614606e1a2267a84f0b0be' -- some weird poll
)
SELECT
voter,
1 as count,
count(tx_hash) as tx_count,
count(distinct pollid) as polls_voted,
min(date_trunc('month',block_timestamp)) as month,
min(date(block_timestamp)) as first_vote,
max(date(block_timestamp)) as last_vote,
datediff('day', first_vote, getdate()) as age_in_maker,
datediff('day', first_vote, last_vote) as active_days_in_maker,
datediff('day', last_vote, getdate()) as days_since_last_vote
FROM polls
GROUP BY 1
ORDER BY polls_voted DESC
Run a query to Download Data