Looking for sql Answers? Try Ask4KnowledgeBase
Looking for sql Keywords? Try Ask4Keywords

SQLFinding Duplicates on a Column Subset with Detail


Remarks

  • To select rows with out duplicates change the WHERE clause to "RowCnt = 1"

  • To select one row from each set use Rank() instead of Sum() and change the outer WHERE clause to select rows with Rank() = 1