Last active
March 8, 2020 16:54
-
-
Save lewisvoncken/0c711ebc27f754d4dc40d3895bc75e1a to your computer and use it in GitHub Desktop.
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 DISTINCT u.url_rewrite_id from store as s | |
INNER JOIN store_group as sg | |
ON s.group_id = sg.group_id | |
INNER JOIN catalog_category_entity as c | |
ON sg.root_category_id = SUBSTRING_INDEX(SUBSTRING_INDEX(c.path, '/', 2), '/', -1) | |
LEFT JOIN url_rewrite as u | |
ON c.entity_id = u.entity_id AND s.store_id != u.store_id | |
WHERE entity_type = 'category' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment