carlesmontalaGroundhog Day
Updated 2023-01-18
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 luna as (
select
date_trunc('day',recorded_hour) as date,
avg(close) as price_usd,
avg (price_usd) over (order by date rows between 6 preceding and current row) as price_ma_7,
avg (price_usd) over (order by date rows between 29 preceding and current row) as price_ma_30
from crosschain.core.fact_hourly_prices
where id = 'terra-luna-2'
and date >= CURRENT_DATE-60
group by date
order by date desc
),
solana as (
select
date_trunc('day',recorded_hour) as date,
avg(close) as price_usd,
avg (price_usd) over (order by date rows between 6 preceding and current row) as price_ma_7,
avg (price_usd) over (order by date rows between 29 preceding and current row) as price_ma_30
from crosschain.core.fact_hourly_prices
where id = 'solana'
and date >= CURRENT_DATE-60
group by date
order by date desc
),
flow as (
select
date_trunc('day',recorded_hour) as date,
avg(close) as price_usd,
avg (price_usd) over (order by date rows between 6 preceding and current row) as price_ma_7,
avg (price_usd) over (order by date rows between 29 preceding and current row) as price_ma_30
from crosschain.core.fact_hourly_prices
where id = 'flow'
and date >= CURRENT_DATE-60
group by date
order by date desc
),
Run a query to Download Data