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
# | |
# These queries check attributes values at the none-global store view scopes. | |
# | |
-- catalog_product_entity_datetime | |
SELECT a.* | |
FROM (SELECT * FROM catalog_product_entity_datetime) AS a | |
-- This inner join finds all store view-specific rows that exactly match the global scope value. The b.store_id = 0 conditional is key as it targets the global row | |
INNER JOIN (SELECT * FROM catalog_product_entity_datetime) AS b ON a.attribute_id = b.attribute_id AND a.entity_id = b.entity_id AND a.value = b.value AND b.store_id = 0 | |
WHERE a.store_id <> 0 | |
GROUP BY a.attribute_id, a.entity_id, a.value, a.store_id; |