3 ms·
Building https://tablam.org 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
by mamcx 5y ago
Building https://tablam.org 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)
- barrkel 5y agoGROUP 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.