News for hackers. Stuff that matters.
Re:What's the strangest code you've seen a senior developer ... by xupybd on Sunday March 27, 2022 @04:25AM (#30818671)
Yeah and if you put everything in as left joins filtering only happens in the where clause. It becomes easier to understand why rows are missing. I've done this in the past when I wanted to make it obvious that x was getting filtered out of the result set.
Re:What's the strangest code you've seen a senior developer ... by dotancohen on Sunday March 27, 2022 @06:26AM (#30819170)
You can filter on the left table by putting the conditions in the ON clause.
Re:What's the strangest code you've seen a senior developer ... by xupybd on Sunday March 27, 2022 @02:11PM (#30822523)
Exactly you can but then your query has multiple places to examine if you want to know what out you should expect. By having it all in the where clause it can read a little better.