mattkstewProposal 1
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
26
›
⌄
with tab1 as (
select
PROPOSAL_ID,
count(distinct voter) as Total_Votes
from terra.core.fact_governance_votes
group by 1
order by 2 desc )
, tab2 as (
select
proposal_id,
message_value:content:description as Proposal
from terra.core.fact_governance_submit_proposal left outer join terra.core.ez_messages on
terra.core.fact_governance_submit_proposal.tx_id = terra.core.ez_messages.tx_id
where proposal_id in (select proposal_id from tab1)
)
select
tab1.proposal_id,
Proposal,
Total_Votes
from tab1 left outer join tab2 on tab1.proposal_id = tab2.proposal_id
where tab1.proposal_id = 349
Run a query to Download Data