News for hackers. Stuff that matters.
Re:SQL Anti-Patterns You Should Avoid by petalmind on Saturday October 18, 2025 @12:00PM (#45628356)
> Overusing DISTINCT to “Fix” Duplicates

I wrote a small tutorial (~9000 words in two parts) on how to design complicated queries so that they don't need DISTINCT and are basically correct by construction.

https://kb.databasedesignbook.com/posts/systematic-design-of...

Re:SQL Anti-Patterns You Should Avoid by joshmn on Saturday October 18, 2025 @12:31PM (#45628544)
Nice articles in there. Bookmarked.

Edit: it’s also actually a book!