Examples: Invalid Examples with GROUP BY TIME and No Timecode Specification - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cxa1555383531762.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1208
lifecycle
previous
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));

*** *** 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));
 
 *** 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));

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