Afonso_Diaz2023-11-04 02:32 PM
Updated 2023-11-04
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
t1 as (
select
),
t2 as (
select
tx_id,
block_timestamp,
nvl(try_parse_json(attribute_value):amount::float, 0) as amount_atom,
fee/1e9 as fee_atom,
try_parse_json(attribute_value):denom::string
from cosmos.core.fact_msg_attributes
join cosmos.core.fact_transactions
using(tx_id, block_timestamp)
where ATTRIBUTE_KEY ilike 'packet_data'
and msg_type ilike 'send_packet'
and split(try_parse_json(attribute_value):denom::string, '/')[0] in (select distinct address from cosmos.gov.fact_validators)
and tx_id in (
select distinct tx_id from cosmos.core.fact_msg_attributes
where msg_type ilike 'send_packet'
and attribute_value ilike 'channel-391'
)
)
select * from t2
Run a query to Download Data