SocioAnalyticabridge (wormhole)
Updated 2024-03-21
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 sei_wormhole as (
SELECT
block_timestamp,
tx_id
FROM sei.core.fact_msg_attributes
WHERE attribute_key = 'transfer.recipient_chain'
and msg_type = 'wasm'
AND ATTRIBUTE_VALUE is not null
and block_timestamp::date >= dateadd(day, -datediff(day,'2024-02-17',current_date()),'2024-02-17')
)
,
sei_price as (
SELECT 'SEI' as network,
RECORDED_HOUR as date,
price as last_price
FROM osmosis.price.ez_prices
WHERE symbol = 'SEI'
qualify row_number () over (order by date DESC) = 1
)
,
fee_sei as (
select
case when a.block_timestamp::date >= '2024-02-17' then 'After' else 'Before' end as direction,
avg(split(fee,'usei')[0] / pow(10,6)) as avg_fee_sei,
median(split(fee,'usei')[0] / pow(10,6)) as median_fee_sei
from sei.core.fact_transactions a
inner join sei_wormhole b using(tx_id, block_timestamp)
where block_timestamp::date >= dateadd(day, -datediff(day,'2024-02-17',current_date()),'2024-02-17')
group by 1
)
select
network
,direction
QueryRunArchived: QueryRun has been archived