saeedmzn$OP Airdrop - price compare
Updated 2022-11-16Copy Reference Fork
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
›
⌄
with op_price as (
select date_trunc(day,HOUR) ::date date ,
avg(price) OP_price
from optimism.core.fact_hourly_token_prices
where SYMBOL = 'OP'
group by 1
),
ETH_price as (
select date_trunc(day,HOUR) ::date date,
avg (price) as ETH_Price
from ethereum.core.fact_hourly_token_prices
where symbol in ('WETH') and hour >= '2022-05-31'
group by 1),
BTC_price as (
select date_trunc(day,HOUR) ::date date,
avg (price) as BTC_Price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WBTC'
group by 1
),
OP_peer_ETH as (
select date,
(OP_price/ETH_Price) OP_peer_ETH,
(OP_price/BTC_Price) OP_peer_BTC
from op_price join ETH_price using (date)
join BTC_price using (date)
group by 1,2 ,3
)
select * from OP_peer_ETH
Run a query to Download Data