Skip to content

Instantly share code, notes, and snippets.

@edersqo
Created April 11, 2018 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edersqo/58e08c02e0e4d62f69bb152c819947f8 to your computer and use it in GitHub Desktop.
Save edersqo/58e08c02e0e4d62f69bb152c819947f8 to your computer and use it in GitHub Desktop.
Number of PriceLists duplicated by Store
--- Number of items duplicated by locale.
SELECT DISTINCT(PRICE_LIST), COUNT(*)
FROM
(
SELECT PRICE_LIST, SKU_ID, COUNT(*)
FROM WLM_PROD_CATA.DCS_PRICE
GROUP BY
PRICE_LIST, SKU_ID
HAVING
COUNT(*) > 1
) DERIVED_TABLE
GROUP BY PRICE_LIST
ORDER BY COUNT(*) DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment