alitaslimiPrices Normalised
Updated 2024-12-31
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
-------------------- Prices --------------------
prices as (
select
hour::date as date,
avg(price) as price
from
bitcoin.price.ez_prices_hourly
group by
date
),
-------------------- 2012 --------------------
halving_2012 as (
select
date,
datediff('day', '2012-11-28', date) as day_diff,
price,
price / (select price from prices where date = '2012-11-28') as price_normalised
from
prices
where
date between (to_date('2012-11-28') - 180) and (to_date('2012-11-28') + 180)
),
-------------------- 2016 --------------------
halving_2016 as (
select
date,
datediff('day', '2016-07-09', date) as day_diff,
price,
price / (select price from prices where date = '2016-07-09') as price_normalised
from
prices
where
date between (to_date('2016-07-09') - 180) and (to_date('2016-07-09') + 180)
),
-------------------- 2020 --------------------
QueryRunArchived: QueryRun has been archived