SQL To Show duplicate SKUs in table

Only return rows that have the same value in the ID column

SELECT *
FROM product_table A
WHERE EXISTS (
  SELECT 1 FROM product_table B WHERE A.SKU = B.SKU ORDER
  BY A.SKU ASC LIMIT 1, 1
) ORDER BY sku ASC

 

Gareth
Buy Me A Coffee
back arrowBack to Index