MLDZMNEDB1 copy
Updated 2023-04-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
-- forked from EDB1 @ https://flipsidecrypto.xyz/edit/queries/431b94f7-1522-40ba-b666-545624e1e884
select
HOUR::date as day,
avg(price) as token_price,
lag(token_price) ignore nulls over(ORDER BY day ASC) as lag_price,
((token_price-lag_price)/token_price)*100 as deviation_price,
avg(token_price) OVER (ORDER BY day ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as MA_7_Days_volume,
avg(token_price) OVER (ORDER BY day ROWS BETWEEN 15 PRECEDING AND CURRENT ROW) as MA_15_Days_volume
from ethereum.core.fact_hourly_token_prices
where hour>= '2023-04-15'
and symbol in ('WETH')
group by 1
Run a query to Download Data