MLDZMNprice corr
Updated 2023-10-29
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 price1 @ https://flipsidecrypto.xyz/edit/queries/bae6f536-c5e4-431e-9402-8582980035c1
-- forked from sol2 @ https://flipsidecrypto.xyz/edit/queries/d956c724-a32a-4e5f-84e9-6b8467f68b23
with tb1 as (select
HOUR::date as day,
avg(price) as ETH_price,
lag(ETH_price) ignore nulls over(ORDER BY day ASC) as lag_price,
((ETH_price-lag_price)/ETH_price)*100 as deviation_price_ETH,
((first_value(ETH_price) over ( order by day asc) -
first_value(ETH_price) over (order by day desc)
)/first_value(ETH_price) over ( order by day asc))*100 as diff_ETH
from ethereum.price.ez_hourly_token_prices
where hour>= '2023-09-04'
and symbol in ('WETH')
group by 1),
tb2 as (select
HOUR::date as day,
avg(price) as MATIC_price,
lag(MATIC_price) ignore nulls over(ORDER BY day ASC) as lag_price,
((MATIC_price-lag_price)/MATIC_price)*100 as deviation_price_MATIC
from ethereum.price.ez_hourly_token_prices
where hour>= '2023-09-04'
and symbol in ('WMATIC')
group by 1),
tb3 as (select
HOUR::date as day,
avg(price) as VEXT_price,
lag(VEXT_price) ignore nulls over(ORDER BY day ASC) as lag_price,
((VEXT_price-lag_price)/VEXT_price)*100 as deviation_price_VEXT
from ethereum.price.ez_hourly_token_prices
where hour>= '2023-09-04'
and TOKEN_ADDRESS = lower('0xB2492E97a68a6E4B9E9a11B99F6C42E5aCCD38c7')
group by 1)
Run a query to Download Data