Created
April 12, 2018 15:59
-
-
Save mtbottens/45ad72f35be15e201a42e66236219a67 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
INSERT INTO | |
catalog_product_website (website_id, product_id) | |
SELECT | |
sw.website_id, | |
cpw.product_id | |
FROM | |
store_website sw | |
JOIN ( | |
SELECT | |
cpwd.product_id | |
FROM | |
catalog_product_website cpwd | |
GROUP BY | |
cpwd.product_id | |
HAVING count(cpwd.product_id) = 1 | |
) cpw | |
WHERE | |
sw.website_id != 0 AND sw.website_id != 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment