ValiMohammadi2023-02-15 10:24 PM
Updated 2023-02-15
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
29
30
31
32
33
›
⌄
with Submited_Proposal as (
select
block_timestamp::date as date_submit,
tx_id,
proposer,
proposal_id,
proposal_type
from terra.core.fact_governance_submit_proposal
where tx_succeeded = true
),
Submited_details as (
select
submit.*,
tx:body:messages[0] as content,
tx:body:messages[0]:content:description as proposal_desciption,
tx:body:messages[0]:content:title as Proposal_Title,
tx:body:messages[0]:initial_deposit[0]:amount as initial_deposit
from Submited_Proposal submit
join terra.core.fact_transactions transactions using(tx_id)
where Proposal_Title ilike('%grant%') or Proposal_Title ilike ('%fund%')
)
select
proposal_id,
Proposal_Title ,
proposer ,
proposal_type,
date_submit,
initial_deposit,
proposal_desciption
from Submited_details
order by date_submit desc
Run a query to Download Data