GROUP BY Clause Examples | SQL SELECT Statements | Teradata Vantage - 17.05 - Example: Simple GROUP BY Operation - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)

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