MLDZMNlido5
Updated 2023-05-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
›
⌄
-- forked from lido4 @ https://flipsidecrypto.xyz/edit/queries/8c8e1d44-acba-46b1-9f1d-b43a8cf16f5b
-- forked from lido1 @ https://flipsidecrypto.xyz/edit/queries/dbc77b38-a863-4e1d-aaa4-0d3490aa2ee3
with tb1 as (select
HOUR,
avg(price) as ETH_price,
lag(ETH_price) ignore nulls over(ORDER BY hour ASC) as lag_price,
((ETH_price-lag_price)/ETH_price)*100 as deviation_price_ETH
from ethereum.core.fact_hourly_token_prices
where hour>= '2023-05-15'
and symbol in ('WETH')
group by 1),
tb2 as (select
HOUR,
avg(price) as BTC_price,
lag(BTC_price) ignore nulls over(ORDER BY hour ASC) as lag_price,
((BTC_price-lag_price)/BTC_price)*100 as deviation_price_BTC
from ethereum.core.fact_hourly_token_prices
where hour>= '2023-05-15'
and symbol in ('WBTC')
group by 1),
pp as (select
hour,
avg(price) as token_price,
lag(token_price) ignore nulls over(ORDER BY hour ASC) as lag_price,
((token_price-lag_price)/token_price)*100 as deviation_price_stETH
from ethereum.core.fact_hourly_token_prices
where token_address=lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84')
and hour>= '2023-05-15'
group by 1
),
t1 as (SELECT
Run a query to Download Data