ZookUntitled Query
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 BED_prices as (
select
hour,
price as price
from ethereum.token_prices_hourly
where lower(token_address) = lower('0x2aF1dF3AB0ab157e1E2Ad8F88A7D04fbea0c7dc6') -- BED
and hour > '2021-12-06 00:00:00.000' -- 90 days
order by 1 )
,
wbtc_prices as (
select
hour,
symbol,
price
from ethereum.token_prices_hourly
where lower(symbol) = 'wbtc'
and hour > '2021-12-06 00:00:00.000'
order by hour)
,
eth_prices as (
select
hour,
symbol,
price as price,
first_value(price) over (order by hour) as first_price,
(price-first_price)/first_price*100 as percentage_change_eth
from ethereum.token_prices_hourly
where lower(symbol) = 'eth'
and hour > '2021-12-06 00:00:00.000'
order by hour),
combined_prices as (
select
Run a query to Download Data