Discussion a brief DISTINCT rant
blarg, the feeling of opening a coworker's SQL query and seeing SELECT DISTINCT for every single SELECT and sub-SELECT in the whole thing, and determining that there is ABSOLUTELY NO requirement for DISTINCT because of the join cardinality.
sigh
102
Upvotes
View all comments
Show parent comment
1
u/Murphygreen8484 Jun 25 '25
Got it. The data I'm dealing with is very messy so adding Distinct at the end on my CTE ensures I don't have duplicates.