wanlinCopy of Price Difference between Eth and stETH copy
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
›
⌄
-- forked from Zook / Copy of Price Difference between Eth and stETH @ https://flipsidecrypto.xyz/Zook/q/Vjgl8G85gPCY/copy-of-price-difference-between-eth-and-steth
with eth_prices as (
SELECT
Symbol,
hour,
price as eth_price
from ethereum.core.Price.fact_hourly_token_prices
where lower(symbol) = 'weth'
and price > 2500 -- removing a few data points that showed incorrect pricing
and hour > '2021-08-01 23:00:00.000'
group by 1,2,3
order by 2 DESC
),
steth_prices as (
SELECT
Symbol,
hour,
price as steth_price
from ethereum.core.Price.fact_hourly_token_prices
where lower(symbol) = 'steth'
and price > 2500
and hour > '2021-08-01 23:00:00.000'
group by 1,2,3
order by 2 DESC
)
Select
steth_prices.hour,
steth_prices.steth_price as steth_price,
eth_price,
(eth_price - steth_price) as price_difference
from steth_prices left join eth_prices on steth_prices.hour = eth_prices.hour
where price_difference < 500 -- removing a value that was above 600. Unlikely to be correct data.
Run a query to Download Data