ADQL Reference:

Your Rating:
13 rates

Use the 
SINCE... UNTIL clause on a time range in a query. If the UNTIL portion is omitted, the query matches all the events that occurred after the time specified in the SINCE portion. A query can contain both a SINCE... UNTIL clause and a WHERE clause. In such cases, WHERE argument comes before SINCE... UNTIL and is applied in that order. The time range specified in the clause overrides any other time limits applied to the query, including the time range selection in the UI.


SINCE timevalue [UNTIL timevalue]

where timevalue is a combination of an integer and (optionally) a time unit. If timevalue is omitted the value is interpreted as a Unix epoch timestamp in milliseconds.

Unit Symbols
[m | minute | minutes]minute
[h | hour | hours]hour
[d | day | days]day
[w | week | weeks]week (7 days)


SELECT * FROM transactions SINCE 1 h UNTIL 15 mAll transactions that occurred between 1 hour and 15 minutes ago
SELECT * FROM transactions SINCE 1 hAll transactions that occurred after one hour ago
SELECT * FROM transactions SINCE 1502147143000 UNTIL 1502148043000All transactions that occurred between the Unix timestamps 1502147143000 and 1502148043000

  • No labels