binhachon28. [Easy] Price Correlation -RUNE, XRUNE and THOR
Updated 2021-12-11
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 rune_prices as(
select
date_trunc('hour', block_timestamp) as blocktime,
avg(RUNE_USD) as rune_price
from
thorchain.prices
group by
blocktime
),
xrune_price as(
select
hour as blocktime,
price as xrune_price
from
ethereum.token_prices_hourly
where
symbol = ('XRUNE')
),
thor_price as(
select
hour as blocktime,
price as thor_price
from
ethereum.token_prices_hourly
where
symbol = 'THOR'
)
select
rune_prices.blocktime,
rune_price,
xrune_price,
thor_price
from
rune_prices
left join xrune_price on rune_prices.blocktime = xrune_price.blocktime
left join thor_price on rune_prices.blocktime = thor_price.blocktime
Run a query to Download Data