Duplicates can be found by grouping rows, using the COUNT aggregate function, and filtering rows with a HAVING clause. Only duplicate records—those with the same product name and category—are returned by this query: