rajsProposals Text
Updated 2023-01-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
24
25
26
27
28
›
⌄
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
attributes:submit_proposal:proposal_id::numeric as proposal_id,
message_value:content:title as title,
case when proposal_id in ('3794', '3795') then 'Rejected' else 'Passed' end as status,
message_value:content:description as description,
block_timestamp,
tx_id
-- *
from terra.core.ez_messages
-- where tx_id = '4DD41985A86C26978438EF7FE9D15523E0B79F4A6C379ED296E4833F3BCFDFFF'
where message_type = '/cosmos.gov.v1beta1.MsgSubmitProposal'
and proposal_id in (select proposal_id from latest_proposals)
order by block_timestamp desc
Run a query to Download Data