kiacryptovotes and unique voters per proposal
Updated 2023-02-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with votes as (
select
date_trunc('day', block_timestamp) as date,
attribute_value,
count(distinct tx_id) as votes_count
from cosmos.core.fact_msg_attributes
where
attribute_key = 'proposal_id'
group by 1, 2
),
voters as (
select
date_trunc('day', t.block_timestamp) as day,
attribute_value,
count(distinct tx_from) as unique_voters
from cosmos.core.fact_transactions t join cosmos.core.fact_msg_attributes m on t.tx_id = m.tx_id
where
attribute_key = 'proposal_id'
group by 1, 2
)
select *
from votes join voters on date = day and votes.attribute_value = voters.attribute_value
where date >= '2023-01-01'
Run a query to Download Data