Grouping Operations
I am separating the partitions and grouping operations based on the idea that a group has group properties that we are trying to find, so we get a single row back for each group. A partition is simply a way of subsetting the original table, so we get a table back as a result.
28.1 GROUP BY Clause
The GROUP BY clause is based on simple partitions. A partition of a set divides the set into subsets such that (1) the union of the subsets returns the original set and (2) the intersection of the subsets is empty. Think of it as cutting up a pizza pie—each piece of pepperoni belongs to one and only one slice of pizza. When you get to the section on SQL-99 OLAP extensions, you will see “variation on a theme” in the ROLLUP and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access