Summarizing Groups of Data
We can use PROC SQL steps to create detail reports.
But you might also want to summarize data in groups. To group data
for summarizing, you can use the GROUP BY clause. The GROUP BY clause
is used in queries that include one or more summary functions. Summary
functions produce a statistical summary for each group that is defined
in the GROUP BY clause.
Example
The following example
demonstrates the GROUP BY clause and summary functions.
Suppose you want to determine the total number of miles traveled by frequent-flyer program members in each of three membership classes (Gold, Silver, and Bronze). Frequent-flyer program information is stored in the table Sasuser.Frequentflyers. To summarize your data, you can submit ...
Get SAS Certification Prep Guide, 4th Edition 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.