hanseflow - Unternehmensberatung für Salesforce

Lernen Sie uns kennenLernen Sie uns kennen
SELECT *
FROM table
WHERE `nubmer` IN (
    SELECT `number`
    FROM table
    GROUP BY `number`
    HAVING count(number) > 1
    )
ORDER BY `number`

Ein anderes Beispiel:

DELETE FROM users
WHERE id NOT IN (
  SELECT * FROM (
    SELECT MIN(id)
    FROM users
    GROUP BY email
  ) as t);

Beispiel für die Magento SKU:

SELECT *
FROM catalog_product_entity
WHERE `sku` IN (
    SELECT `sku`
    FROM catalog_product_entity
    GROUP BY `sku`
    HAVING count(sku) > 1
    )
ORDER BY `sku`
No Comments

Sorry, the comment form is closed at this time.