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
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
vnq1596660420420.ditamap
dita:ditavalPath
hoy1596145193032.ditaval

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