Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Combining aggregated and raw results - GROUP BY #190
[Currently completing Instructor checkout]
In Aggregation, the unexpected behaviour encountered when combining aggregate and raw results in the absence of a GROUP BY clause is described starting at line 118:
The episode then moves on to a discussion of what happens when there are no values to aggregate and the handling of null values before circling back to the problem of combining aggregate and raw data and introducing the GROUP BY clause.
I suggest that the section quoted above be removed, and the reference to this behaviour in the later section:
be expanded to include a fuller explanation. In this way, the solution to the problem is presented immediately, rather than leaving a thread dangling while we look at other issues.
It may also be worth noting that some database managers won't execute a query that combines raw and aggregate data unless a GROUP BY clause is included.