Not ashamed to admit that I never really thought about the distinct operator 'being redundant' as its essentially just a group by.
replies(3):
I wish SQL had a strict mode syntax that forces you to use something like `select one` (like LINQ’s Single()) or `select many` to catch these kinds of bugs.
SELECT DISTINCT ON is different, and useful.
- For a question worth 2 points, if you use the word "DISTINCT" when it wasn't needed, you lose 0.5 points.
- If you don't use "DISTINCT" when it was necessary, you lose all 2 points.