binhachonSteady As She Goes - WBTC and WETH monthly
Updated 2022-02-27
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 luna_daily_open as (
select
date_trunc('day', hour) as luna_daily_open_time,
symbol,
price as luna_daily_open_price
from ethereum.token_prices_hourly
where symbol in ('WBTC', 'WETH')
and date_part('hour', hour) = 0
union all
select
date_trunc('day', block_timestamp) as luna_daily_open_time,
symbol,
min(price_usd) as luna_daily_open_price
from terra.oracle_prices
where symbol in ('LUNA')
and date_part('hour', block_timestamp) = 0
group by luna_daily_open_time, symbol
),
luna_daily_low as (
select
date_trunc('day', hour) as luna_daily_low_time,
symbol,
min(price) as luna_daily_low_price
from ethereum.token_prices_hourly
where symbol in ('WBTC', 'WETH')
group by symbol, luna_daily_low_time
union all
select
date_trunc('day', block_timestamp) as luna_daily_low_time,
symbol,
min(price_usd) as luna_daily_low_price
from terra.oracle_prices
where symbol in ('LUNA')
group by symbol, luna_daily_low_time
),
percent_change as (
Run a query to Download Data