News for hackers. Stuff that matters.
Re:SQL: The difference between WHERE and HAVING by mamcx on Tuesday December 14, 2021 @11:33AM (#29553507)
Building https://tablam.org I learn a bit about the relational model and found that the whole having/group by is plain bad "hack".

GROUP BY is totally the opposite of what you expect. It NOT "group by"!,

This is group by:

    1:
       A
       B
    2:
       A
       C
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)
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.