Soheil_MKUntitled Query
Updated 2022-12-11
999
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
34
35
36
›
⌄
with op as (
select
VOTE_ID,
DESCRIPTION
from osmosis.core.dim_vote_options
),
votes as (
select
distinct tx_id
from cosmos.core.fact_msg_attributes
where ATTRIBUTE_KEY = 'proposal_id'
and ATTRIBUTE_VALUE ='82'
),
options as (
select
distinct TX_ID,
try_parse_json ( ATTRIBUTE_VALUE):option as opt,
try_parse_json ( ATTRIBUTE_VALUE):weight as weight
from cosmos.core.fact_msg_attributes a
where tx_id in (select tx_id from votes)
and ATTRIBUTE_KEY ='option'
),
voters as (
select
BLOCK_TIMESTAMP,
TX_ID,
ATTRIBUTE_VALUE as voter
from cosmos.core.fact_msg_attributes
where tx_id in (select tx_id from votes)
and MSG_TYPE ='transfer'
and ATTRIBUTE_KEY='sender'
),
Run a query to Download Data