superflyUntitled Query
Updated 2022-11-23Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
›
⌄
with min as (select avg(price) as Price from ethereum.core.fact_hourly_token_prices
where symbol in ('WETH') and hour::date = (select max(hour::date) from ethereum.core.fact_hourly_token_prices)),
min2 as (select avg(price) as Nov_Price
from ethereum.core.fact_hourly_token_prices where symbol in ('WETH')
and hour::date = '2022-11-01'),
min3 as (select avg(price) as Avg_Price,
(avg(case when hour > CURRENT_DATE - 3 then price end) - avg(case when hour::date = '2022-11-01' then price end)) / (avg(case when hour::date = '2022-11-01' THEN price END)) * 100 as Change_Ratio_Price
from ethereum.core.fact_hourly_token_prices where symbol in ('WETH')
and hour >= '2022-11-01')
select price, Nov_Price,* from min3 join min join min2
Run a query to Download Data