Created
May 25, 2020 14:51
-
-
Save anton-roos/a6442bedd3fd269e34bfe19ac2c3ba3b to your computer and use it in GitHub Desktop.
Count duplicate WooCommerce Products SKUs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `meta_value`, `meta_key`, count(*) | |
FROM wp_postmeta WHERE meta_key LIKE '_sku' | |
GROUP BY `meta_value` | |
ORDER BY `count(*)` DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment