Example: Simple GROUP BY Operation - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

Generate a report of salary totals by department, the result might look something like the report that follows.

     SELECT dept_no, SUM(salary)
     FROM employee
     GROUP BY dept_no;

The result might be similar to the report that follows.

dept_no

-------

SUM(salary)

-----------

100 180,500.00
300 143,000.00
500 268,000.00
600 146,600.00
700 113,000.00