SQL How to remove duplicates within select query? - …
https://stackoverflow.com/questions/3695369/sql-how-to-remove-duplicates-within-select-query
Sep 12, 2010 . You didn't indicate which field is preferred when removing duplicates, so this query will prefer the last name in alphabetical order. SELECT MAX (owner_name), --floored to the second dateadd (second,datediff (second,'2000-01-01',start_date),'2000-01-01') AS StartDate From MyTable GROUP BY dateadd (second,datediff (second,'2000-01-01',start_date),'2000-01-01')
DA: 90 PA: 96 MOZ Rank: 89