rajsHeatmap of Votes
Updated 2023-01-25Copy Reference Fork
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
›
⌄
with latest_proposals as
(
SELECT
proposal_id,
count(*) as no_of_votes,
count(distinct voter) as no_of_voters,
min(block_timestamp),
max(block_timestamp)
from terra.core.fact_governance_votes
where tx_succeeded
group by 1
order by 5 desc
limit 5
)
SELECT
to_char(block_timestamp, 'dy') as day_of_week,
extract(dow from block_timestamp) as dow,
extract(hour from block_timestamp) as hour,
count(distinct tx_id) as no_of_votes,
count(distinct voter) as no_of_voters
from terra.core.fact_governance_votes
where proposal_id in (select proposal_id from latest_proposals)
group by 1,2,3
order by 2,3
Run a query to Download Data