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 `bn0z_catalog_category_entity_varchar` AS `t_d` INNER JOIN `bn0z_catalog_category_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `bn0z_catalog_category_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 = 7 WHERE (e.entity_id IN (462, 463, 464, 353, 359, 466, 465, 436, 649, 416, 470, 484, 490, 491, 518, 406, 413, 471, 357, 399, 403, 483, 489, 367, 472, 485, 492, 493, 468, 377, 360, 473, 356, 486, 487, 365, 385, 364, 669, 550, 426, 427, 521, 380, 366, 475, 423, 398, 402, 467, 390, 414, 474, 425, 391, 400, 502, 504, 476, 354, 662, 663, 508, 368, 480, 358, 469, 652, 482, 363, 661, 370, 459, 415, 458, 369, 371, 435, 394, 548, 520, 545, 501, 668, 379, 384, 389, 407, 557, 506, 513, 509, 664, 361, 523, 546, 650, 378, 383, 388, 494, 408, 405, 507, 510, 665, 654, 396, 362, 543, 549, 552, 376, 381, 386, 495, 511, 666, 655, 397, 553, 496, 412, 555, 512, 667, 656, 411, 556, 658, 404, 446, 659, 461, 660, 374, 457, 551, 651)) AND (t_d.attribute_id IN ('42')) AND (t_d.store_id = IFNULL(t_s.store_id, 0))