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

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
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