The GROUP BY Clause
A Brief Overview
Use the GROUP BY clause to group your
data for summarization. You can use the GROUP BY clause to do the
following:
-
classify the data into groups based on the values of one or more columns.
-
group multiple columns, or separate the column names with commas within the GROUP BY clause. You can use aggregate functions with any of the columns that you select.
Note: If you specify a GROUP BY
clause in a query that does not contain a summary function, your clause
is changed to an ORDER BY clause, and a message is written to the
SAS log.
To summarize data, you can use the following summary functions with PROC SQL. Notice that some functions have more than one name to accommodate both SAS and SQL conventions. ...
Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.