boomer77$LUNA 30 secs
Updated 2021-10-19
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
select luna_exchange_rate as LUNA_price,
date_trunc('minute', block_timestamp) as min,
datediff(seconds, min, block_timestamp) as seconds,
CASE when seconds = 0 THEN min
WHEN seconds >0 AND seconds < 15 then min -- round down to 00:00
WHEN seconds >= 15 AND seconds < 45 then DATEADD('seconds', 30, min)
WHEN seconds >= 45 AND seconds < 60 then DATEADD('seconds', 60, min)
ELSE NULL END AS "timestamp (30 Seconds)"
from terra.oracle_prices
where currency = 'uusd' and source = 'oracle' and block_timestamp between '2021-05-19' and '2021-05-23'
-- method to round-off to every 30 sec courtesy of Pinehearst#1947
Run a query to Download Data