hmxintern📚 🕛
Updated 2024-05-29
999
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 config as (
select timestamp '2024-03-01 00:00:00' as start_date,
timestamp '2024-05-01 23:59:59' as end_date
),
prices as (
select * from
(
-- HMX Price
(select date_trunc('day', hour) as time, symbol, decimals,
avg(price) as price
from arbitrum.price.ez_prices_hourly
where symbol = 'HMX' and hour >= (select start_date from config)
and hour <= (select end_date from config)
group by date_trunc('day', hour), symbol, decimals)
union all
-- USDB Price
(select date_trunc('day', hour) as time, symbol, decimals,
avg(price) as price
from blast.price.ez_prices_hourly
where symbol = 'USDB' and hour >= (select start_date from config)
and hour <= (select end_date from config)
group by date_trunc('day', hour), symbol, decimals)
union all
-- PYTH Price
(select date_trunc('day', hour) as time, symbol, decimals,
avg(price) as price
from solana.price.ez_prices_hourly
where symbol = 'PYTH' and hour >= (select start_date from config)
and hour <= (select end_date from config)
group by date_trunc('day', hour), symbol, decimals)
)
),
rewarder_token (rewarder, price_symbol) as (
select * from
QueryRunArchived: QueryRun has been archived