16.20 - Example: SELECT Query with the WHERE Condition - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1145-162K
Language
English (United States)

The following is an example of using a SELECT query with the WHERE condition:

SELECT *
FROM s1 PIVOT (SUM(sales) FOR mon IN (‘Jan’ as Jan, ‘Feb’ as Feb, ‘Mar’ as Mar))tmp where Jan=100;

 *** Query completed. 1 rows found. 4 columns returned.
 *** Total elapsed time was 1 second.
      Yr          Jan          Feb          Mar
  ------       --------     --------     --------
    2001          100          110          120