Hacker News new | ask | show | jobs
by ak39 1118 days ago
I’ve never truly used DISTINCT and felt comfortable for using it. Always felt using it revealed a design smell in my query. (Been doing SQL for 30 years and still!)
1 comments

yes, thats exactly the way I feel. It might be the right answer, but oftentimes its a smell.

Theres very few cases where you shouldnt be doing a group by with aggregates instead. (window functions count here)