Re:SQL: The difference between WHERE and HAVING
by throwawayffffas on Tuesday December 14, 2021 @09:03AM
(#29551559)
Yeah, you are correct it's really just syntactic sugar for that. As another comment points out, WHERE and HAVING are just σ in relational algebra.
[ Parent
| on HN ]
Re:SQL: The difference between WHERE and HAVING
by maweki on Tuesday December 14, 2021 @09:43AM
(#29552025)
In that sense, HAVING and WHERE being different is basically a "free" subquery without allowing subqueries.
One inner σ (WHERE) and one outer σ (HAVING).
If subqueries are allowed, then you don't need that.