eferPrices
Updated 2024-12-02
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
›
⌄
-- Semi-Functions
WITH RECURSIVE days AS (
SELECT
1 AS days_interval,
'2022-11-15 12:00:00' AS st
), DateRange AS (
SELECT
DATEDIFF(
second,
TIMESTAMP '1970-01-01 00:00:00',
(SELECT st FROM days)
) AS start_time,
CURRENT_TIMESTAMP::timestamp AS end_time,
DATEDIFF(
second,
TIMESTAMP '1970-01-01 00:00:00',
(SELECT st FROM days)
) AS current_time_unix
UNION ALL
SELECT
start_time,
end_time,
current_time_unix + 86400 * (SELECT days_interval FROM days) AS current_time_unix
FROM
DateRange
WHERE
DATEADD(second, 86400 * (SELECT days_interval FROM days), TO_TIMESTAMP_NTZ(current_time_unix)) <= end_time
), DateString AS (
SELECT
'[' || LISTAGG(current_time_unix, ', ') || ']' AS times
FROM
DateRange
),
-- Variables
Auto-refreshes every 24 hours
QueryRunArchived: QueryRun has been archived