winnie-fslido2: price movements copy copy
Updated 2024-09-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
›
⌄
-- forked from mrwildcat / lido2: price movements copy @ https://flipsidecrypto.xyz/mrwildcat/q/4YcUfkjsHLxQ/lido2-price-movements-copy
-- forked from lido2: price movements @ https://flipsidecrypto.xyz/studio/queries/4e3f159a-1459-4bcd-9bcb-5fb0cb2b5bd5
-- stETH prices hourly
WITH steth_token_prices_hourly AS(
SELECT hour, symbol, price AS steth_price FROM ethereum.price.ez_prices_hourly WHERE token_address = lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84')
AND is_imputed = 'FALSE'
AND hour >= CURRENT_DATE - INTERVAL'6 months'
),
-- wETH prices hourly
eth_token_prices_hourly AS(
SELECT hour, symbol, price AS eth_price FROM ethereum.price.ez_prices_hourly WHERE token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' --wETH
AND is_imputed = 'FALSE'
AND hour >= CURRENT_DATE - INTERVAL'6 month'
)
SELECT steth_token_prices_hourly.steth_price, eth_token_prices_hourly.eth_price, eth_token_prices_hourly.hour,
steth_token_prices_hourly.steth_price/eth_token_prices_hourly.eth_price as RELATION
FROM steth_token_prices_hourly
INNER JOIN eth_token_prices_hourly ON steth_token_prices_hourly.hour = eth_token_prices_hourly.hour
QueryRunArchived: QueryRun has been archived