Afonso_Diaz2023-11-04 06:48 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
29
30
31
32
33
34
35
36
›
⌄
with
t1 as (
select
recorded_hour::date as date,
avg(price) as price_usd
from osmosis.price.ez_prices
where symbol = 'ATOM'
group by 1
),
t2 as (
select
tx_id,
block_timestamp,
try_parse_json(attribute_value):amount::float/1e6 as amount,
amount * price_usd as amount_usd,
try_parse_json(attribute_value):sender as user,
try_parse_json(attribute_value):denom as denom
from cosmos.core.fact_msg_attributes
join t1 on date = block_timestamp::date
where msg_type = 'send_packet'
and try_parse_json(attribute_value):receiver ilike '%stride%'
and try_parse_json(attribute_value):receiver ilike '%LiquidStake%'
and tx_id in (
select distinct tx_id from cosmos.core.fact_msg_attributes
where msg_type = 'send_packet'
and attribute_key = 'packet_src_channel'
and attribute_value = 'channel-391'
)
)
select
block_timestamp::date as day,
validator_name,
count(distinct tx_id) as transactions,
Run a query to Download Data