Examples: Invalid Examples with GROUP BY TIME and No Timecode Specification - 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ā„¢

If there are no PTI tables from which to infer the timecode an error is returned.

In the following examples, the USING TIMECODE clause is required because none of the source tables are PTI tables.

sel avg(a.temperature), mode(b.temperature)
from non_pti_tbl_seq a inner join ocean_buoys_nonpti b
on a.buoyid = b.buoyid
group by time(minutes(10));

Result:

 *** Failure 4359 Time Series: GROUP BY TIME clause may not be used without a TIMECODE specification.
sel avg(a.temperature), mode(b.temperature)
from non_pti_tbl_seq a, ocean_buoys_nonpti b
group by time(minutes(10));

Result:

 *** Failure 4359 Time Series: GROUP BY TIME clause may not be used without a TIMECODE specification.
sel avg(a.temperature), mode(a.temperature)
from non_pti_tbl_seq a
group by time(minutes(10));

Result:

 *** Failure 4359 Time Series: GROUP BY TIME clause may not be used without a TIMECODE specification.