Re:SQL: The difference between WHERE and HAVING
by barrkel on Tuesday December 14, 2021 @11:54AM
(#29553895)
GROUP BY is two things, partitioning and aggregation to a single row within each partition. The relational model doesn't really have a model for partitioning on its own so they're fused, but if they were distinct concepts it might make e.g. analytic window functions more composable and less awkward.
GROUP BY is totally the opposite of what you expect. It NOT "group by"!,
This is group by:
If where like this (as in the RM) then you can bet other hacks like graph-ql where not necessary (and will make database more friendly to OO langs)