SELECT for Time Series Tables | Teradata Vantage - SELECT - Analytics Database - Teradata Vantage

Time Series Tables and Operations

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
tuc1628112453431.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
sfz1493079039055
lifecycle
latest
Product Category
Teradata Vantageā„¢

When querying PTI tables, you can use the GROUP BY TIME clause. See GROUP BY TIME Clause. For complete information about SELECT, see Teradata Vantageā„¢ - SQL Data Manipulation Language, B035-1146.

When referencing a PTI table in a SELECT statement:
  • Specifying SELECT * from a PTI table defined with a TD_TIMEBUCKET column returns all of the columns in the table except for the system generated TD_TIMEBUCKET column.
  • When querying PTI tables, you can specify the system generated TD_TIMECODE and TD_SEQNO columns in the SELECT statement.
  • You cannot specify the system generated TD_TIMEBUCKET column in a SELECT statement. However, you can use the TD_GETTIMEBUCKET() function to obtain TD_TIMEBUCKET data. See TD_GETTIMEBUCKET.
  • The BETWEEN logical predicate is inclusive of the lower and upper bounds, which can span multiple time bucket boundaries. If you specify GROUP BY TIME (HOURS(1)), each time bucket only includes the lower bound of the one hour time range. A timestamp of 08:00:00 is in one timebucket and a timestamp of 09:00:00 is in the next time bucket. For example, if you specify BETWEEN 08:00:00 AND 09:00:00 and one hour time buckets are defined, that is,HOURS(1), rows from two time buckets can be returned.
  • As with any SELECT statement, you must specify an order, otherwise rows are returned unordered. For example, SELECT * FROM table_name ORDER BY column_name.