mucrypto2023-12-11 10:05 PM
Updated 2023-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 wbtc as (
select
date_trunc('month', hour) as month,
avg(price) as avg_wbtc_price_per_month,
row_number() over (order by month desc) as rn
from ethereum.price.ez_hourly_token_prices
where symbol in ('WBTC')
group by 1),
wbtc_mom as (
select
c1.month,
c1.avg_wbtc_price_per_month,
(c1.avg_wbtc_price_per_month - c2.avg_wbtc_price_per_month) / c2.avg_wbtc_price_per_month * 100 as "WBTC Month-on-Month Change in Average Price"
from wbtc as c1
left join wbtc as c2
on c1.rn = c2.rn - 1
where c1.month >= '2015-01-01'),
weth as (
select
date_trunc('month', hour) as month,
avg(price) as avg_weth_price_per_month,
row_number() over (order by month desc) as rn
from ethereum.price.ez_hourly_token_prices
where symbol in ('WETH')
group by 1),
weth_mom as (
select
c1.month,
c1.avg_weth_price_per_month,
(c1.avg_weth_price_per_month - c2.avg_weth_price_per_month) / c2.avg_weth_price_per_month * 100 as "WETH Month-on-Month Change in Average Price"
from weth as c1
left join weth as c2
on c1.rn = c2.rn - 1
Run a query to Download Data