logoalt Hacker News

dofm • today at 9:56 AM • 0 replies • view on HN

Feels rather LLM-generated.

Makes reference to self-joins, and anti-joins, but misses out on one of the most puzzling and profound concepts that follows from them: the self-anti-join.

This is the concept I find most likely to get someone to understand that SQL is not a procedural language and doesn’t belong in the same headspace.

My own problem with these sorts of tutorials is that they pay lip service to the idea of saying what, not how, and then lead on syntax. If you only really consider SQL in a syntax-heavy way, you can fall into various traps of thinking that lead to quite non-SQL-like solutions.

Hence my obsession with the self-anti-join, which I think gets the wriggly aspect of this concept across quite quickly.