SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_varchar` AS `t_d` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `catalog_product_entity_varchar` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 5 WHERE (e.entity_id IN (8243, 8677, 9605, 6462, 8587, 8605, 7784, 6327, 8643, 6490, 7860, 7558, 8773, 6980, 7416, 5233, 8017, 7116, 5190, 7725, 7851, 5838, 7501, 8788, 5082, 7240, 5679, 9184, 6978, 5414, 6677, 6557, 5008, 8388, 5575, 8133, 6985, 6383, 8740, 6000, 8203, 9459, 7400, 9850, 5044, 9621, 9574, 8117, 8046, 9373, 9476, 6384, 9249, 6328, 9323, 9208, 5396, 5829, 5658, 5668, 6783, 8173, 7485, 8054, 9387, 6853, 7958, 7051, 8372, 9415, 5837, 9521, 8289, 9513, 9921, 8658, 5392, 8014, 6502, 7557, 6842, 9699, 5835, 7154, 9722, 8754, 9764, 9730, 9629, 8659, 7486, 6755, 7290, 6056, 7794, 8258, 7773, 7183, 8496, 5153, 7026, 7475, 4991, 8242, 7966, 5515, 5480, 7250, 8689, 8288, 7398, 6087, 6051, 5124, 6881, 7547, 8234, 8697, 7312, 6137, 8750, 5211, 5732, 7446, 7415, 8661, 6399, 8060, 7586, 7153, 5678, 7360, 7055, 6997, 9294, 6139, 9230, 7870, 9431, 9192, 7815, 7762, 5890, 7932, 7259, 6850, 7303, 6220, 5446, 5426, 6361, 8115, 8132, 7327, 8963)) AND (t_d.attribute_id IN ('73', '87', '88', '89', '109', '110', '111', '119', '122', '132', '152', '153', '155', '157', '158', '159', '163', '165', '185', '198', '199', '202', '207', '210', '213', '214', '215')) AND (t_d.store_id = IFNULL(t_s.store_id, 0)) UNION ALL SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_text` AS `t_d` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `catalog_product_entity_text` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 5 WHERE (e.entity_id IN (8243, 8677, 9605, 6462, 8587, 8605, 7784, 6327, 8643, 6490, 7860, 7558, 8773, 6980, 7416, 5233, 8017, 7116, 5190, 7725, 7851, 5838, 7501, 8788, 5082, 7240, 5679, 9184, 6978, 5414, 6677, 6557, 5008, 8388, 5575, 8133, 6985, 6383, 8740, 6000, 8203, 9459, 7400, 9850, 5044, 9621, 9574, 8117, 8046, 9373, 9476, 6384, 9249, 6328, 9323, 9208, 5396, 5829, 5658, 5668, 6783, 8173, 7485, 8054, 9387, 6853, 7958, 7051, 8372, 9415, 5837, 9521, 8289, 9513, 9921, 8658, 5392, 8014, 6502, 7557, 6842, 9699, 5835, 7154, 9722, 8754, 9764, 9730, 9629, 8659, 7486, 6755, 7290, 6056, 7794, 8258, 7773, 7183, 8496, 5153, 7026, 7475, 4991, 8242, 7966, 5515, 5480, 7250, 8689, 8288, 7398, 6087, 6051, 5124, 6881, 7547, 8234, 8697, 7312, 6137, 8750, 5211, 5732, 7446, 7415, 8661, 6399, 8060, 7586, 7153, 5678, 7360, 7055, 6997, 9294, 6139, 9230, 7870, 9431, 9192, 7815, 7762, 5890, 7932, 7259, 6850, 7303, 6220, 5446, 5426, 6361, 8115, 8132, 7327, 8963)) AND (t_d.attribute_id IN ('76')) AND (t_d.store_id = IFNULL(t_s.store_id, 0)) UNION ALL SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_decimal` AS `t_d` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `catalog_product_entity_decimal` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 5 WHERE (e.entity_id IN (8243, 8677, 9605, 6462, 8587, 8605, 7784, 6327, 8643, 6490, 7860, 7558, 8773, 6980, 7416, 5233, 8017, 7116, 5190, 7725, 7851, 5838, 7501, 8788, 5082, 7240, 5679, 9184, 6978, 5414, 6677, 6557, 5008, 8388, 5575, 8133, 6985, 6383, 8740, 6000, 8203, 9459, 7400, 9850, 5044, 9621, 9574, 8117, 8046, 9373, 9476, 6384, 9249, 6328, 9323, 9208, 5396, 5829, 5658, 5668, 6783, 8173, 7485, 8054, 9387, 6853, 7958, 7051, 8372, 9415, 5837, 9521, 8289, 9513, 9921, 8658, 5392, 8014, 6502, 7557, 6842, 9699, 5835, 7154, 9722, 8754, 9764, 9730, 9629, 8659, 7486, 6755, 7290, 6056, 7794, 8258, 7773, 7183, 8496, 5153, 7026, 7475, 4991, 8242, 7966, 5515, 5480, 7250, 8689, 8288, 7398, 6087, 6051, 5124, 6881, 7547, 8234, 8697, 7312, 6137, 8750, 5211, 5732, 7446, 7415, 8661, 6399, 8060, 7586, 7153, 5678, 7360, 7055, 6997, 9294, 6139, 9230, 7870, 9431, 9192, 7815, 7762, 5890, 7932, 7259, 6850, 7303, 6220, 5446, 5426, 6361, 8115, 8132, 7327, 8963)) AND (t_d.attribute_id IN ('78', '121', '206')) AND (t_d.store_id = IFNULL(t_s.store_id, 0)) UNION ALL SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_datetime` AS `t_d` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `catalog_product_entity_datetime` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 5 WHERE (e.entity_id IN (8243, 8677, 9605, 6462, 8587, 8605, 7784, 6327, 8643, 6490, 7860, 7558, 8773, 6980, 7416, 5233, 8017, 7116, 5190, 7725, 7851, 5838, 7501, 8788, 5082, 7240, 5679, 9184, 6978, 5414, 6677, 6557, 5008, 8388, 5575, 8133, 6985, 6383, 8740, 6000, 8203, 9459, 7400, 9850, 5044, 9621, 9574, 8117, 8046, 9373, 9476, 6384, 9249, 6328, 9323, 9208, 5396, 5829, 5658, 5668, 6783, 8173, 7485, 8054, 9387, 6853, 7958, 7051, 8372, 9415, 5837, 9521, 8289, 9513, 9921, 8658, 5392, 8014, 6502, 7557, 6842, 9699, 5835, 7154, 9722, 8754, 9764, 9730, 9629, 8659, 7486, 6755, 7290, 6056, 7794, 8258, 7773, 7183, 8496, 5153, 7026, 7475, 4991, 8242, 7966, 5515, 5480, 7250, 8689, 8288, 7398, 6087, 6051, 5124, 6881, 7547, 8234, 8697, 7312, 6137, 8750, 5211, 5732, 7446, 7415, 8661, 6399, 8060, 7586, 7153, 5678, 7360, 7055, 6997, 9294, 6139, 9230, 7870, 9431, 9192, 7815, 7762, 5890, 7932, 7259, 6850, 7303, 6220, 5446, 5426, 6361, 8115, 8132, 7327, 8963)) AND (t_d.attribute_id IN ('79', '80', '94', '95')) AND (t_d.store_id = IFNULL(t_s.store_id, 0)) UNION ALL SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_int` AS `t_d` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `catalog_product_entity_int` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 5 WHERE (e.entity_id IN (8243, 8677, 9605, 6462, 8587, 8605, 7784, 6327, 8643, 6490, 7860, 7558, 8773, 6980, 7416, 5233, 8017, 7116, 5190, 7725, 7851, 5838, 7501, 8788, 5082, 7240, 5679, 9184, 6978, 5414, 6677, 6557, 5008, 8388, 5575, 8133, 6985, 6383, 8740, 6000, 8203, 9459, 7400, 9850, 5044, 9621, 9574, 8117, 8046, 9373, 9476, 6384, 9249, 6328, 9323, 9208, 5396, 5829, 5658, 5668, 6783, 8173, 7485, 8054, 9387, 6853, 7958, 7051, 8372, 9415, 5837, 9521, 8289, 9513, 9921, 8658, 5392, 8014, 6502, 7557, 6842, 9699, 5835, 7154, 9722, 8754, 9764, 9730, 9629, 8659, 7486, 6755, 7290, 6056, 7794, 8258, 7773, 7183, 8496, 5153, 7026, 7475, 4991, 8242, 7966, 5515, 5480, 7250, 8689, 8288, 7398, 6087, 6051, 5124, 6881, 7547, 8234, 8697, 7312, 6137, 8750, 5211, 5732, 7446, 7415, 8661, 6399, 8060, 7586, 7153, 5678, 7360, 7055, 6997, 9294, 6139, 9230, 7870, 9431, 9192, 7815, 7762, 5890, 7932, 7259, 6850, 7303, 6220, 5446, 5426, 6361, 8115, 8132, 7327, 8963)) AND (t_d.attribute_id IN ('93', '97', '123', '125', '126', '127', '128', '131', '133', '138', '187', '196', '197', '211', '212')) AND (t_d.store_id = IFNULL(t_s.store_id, 0))