Algorithm
SELECT DISTINCT sku, COUNT(sku) as occur
- with
Group By
- with Having and a condition
Code Examples
#1 Code Example with MySQL
Code -
MySQL
SELECT DISTINCT sku, COUNT(sku) as occur
FROM `items`
GROUP BY sku
HAVING occur > 1
Copy The Code &
Try With Live Editor
Demonstration
Duplicate Product checker by SKU in MySQL - Having with Group By