Creating Report and Group Summaries

What would a report be without summaries and computations? Let's just say that you would have one frustrated programmer. Certain commands in SQL*Plus allow you to break your report into one or more types of groups and perform summaries or computations on each group. BREAK is a little different from SQL's standard group functions, such as COUNT() and SUM(). These functions are used with report and group summaries to provide a more complete report.


The BREAK ON command breaks returned rows of data from a SQL statement into one or more groups. If you BREAK ON a customer's name, by default, the customer's name will be printed only the first time it is returned, and then left blank with each row of data ...

Get Sams Teach Yourself SQL in 21 Days, Fourth 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.