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_category_entity_varchar` AS `t_d` INNER JOIN `catalog_category_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `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 = 1 WHERE (e.entity_id IN (7462, 7472, 7473, 7474, 7475, 7477, 5651, 5652, 5653, 5654, 5655, 5656, 5722, 5976, 6610, 6459, 6460, 6461, 6462, 6463, 6464, 6530, 6784, 6470, 6471, 6486, 6498, 7176, 6472, 6473, 6591, 6476, 6477, 6478, 6479, 6480, 6534, 6446, 6447, 6448, 6840, 6841, 6855, 7205, 7209, 7229, 6865, 7215, 7227, 6614, 6641, 6658, 6785, 6786, 7187, 6608, 6454, 6444, 6535, 7463, 6607, 6455, 6445, 6536, 7464, 6456, 6720, 6483, 6616, 6645, 7465, 6457, 7466, 6458, 6475, 6555, 7467, 6544, 6531, 6449, 6617, 6542, 7468, 6474, 6546, 6563, 7469, 6779, 6547, 6837, 7174, 7470, 6549, 6561, 6838, 6845, 6569, 7471, 7165, 6846, 6704, 6708, 7196, 6847, 6466, 6562, 6552, 6618, 6551, 6482, 6545, 6550, 7173, 6657, 6631, 6564, 6565, 6548, 6553, 6567, 6554, 6836, 5704, 5710, 5711, 5712, 5713, 5714, 5715, 5716, 5717, 7021, 7219, 6512, 6518, 6519, 6520, 6521, 6522, 6523, 6524, 6525, 6559, 6640, 6834, 6937, 7168, 6497, 6795, 6796, 6804, 6805, 7146, 6647, 6797, 6799, 6576, 6487, 6501, 6788, 6789, 6790, 6792, 7225, 7162, 7172, 7211, 7228, 7208, 7226, 7200, 7201, 7202, 7198, 7199, 6859, 6800, 6803, 6619, 6622, 6874, 6876, 6824, 6825, 6826, 6827, 6709, 6748, 6755, 6771, 6880, 6889, 7089, 7091, 7092, 7093, 7094, 7088, 7180, 6813, 6816, 6820, 6848, 7164, 6850, 6851, 6857, 6871, 7210, 7216, 7218, 6852, 6853, 6858, 6849, 6872, 6873, 6945, 7188, 7189, 7190, 7191, 7194, 7206, 7207, 5705, 5718, 6509, 6513, 6526, 6467, 6494, 6794, 6574, 6581, 6556, 6575, 6491, 6499, 6582, 6666, 6689, 6598, 6615, 6642, 6809, 6810, 6844, 6721, 6944, 7181, 5706, 5719, 6886, 6510, 6514, 6527, 6558, 6495, 6595, 6577, 6578, 6488, 6492, 6632, 6539, 6636, 6839, 6596, 6661, 6807, 6646, 6733, 6722, 6821, 7183, 5707, 5720, 6515, 6528, 6496, 6802, 6579, 6489, 6583, 6633, 6635, 6910, 6675, 6664, 6659, 6843, 6822, 7212, 5708, 5721, 6516, 6529, 6560, 6878, 6533, 6580, 6490, 6502, 6599, 6911, 6895, 6543, 6912, 6679, 6692, 6662, 6651, 6663, 6811, 6723, 6823, 6856, 5709, 6891, 7195, 6517, 6637, 6504, 6603, 6503, 6609, 6791, 6601, 6899, 6683, 6801, 6808, 6724, 6817, 5907, 6715, 6606, 6798, 6505, 6915, 6537, 6896, 6685, 6711, 6725, 6726, 6818, 7152, 6597, 6493, 6917, 6900, 6643, 6812, 6935, 6819, 6903, 6734, 6919, 6730, 6739, 6592, 6929, 6712, 6793, 6890, 6904, 6600, 6573, 6920, 6914, 6931, 6905, 7166, 7184, 6921, 6923, 6934, 6906, 6589, 6593, 6713, 6924, 6925, 6835, 7197, 6936, 6907, 6806, 6926, 6922, 6737, 6833, 6566, 7185, 6729, 6928, 6714, 6930, 6870, 6932, 6875, 6933, 6570, 6612, 6611, 7171, 6590, 6604, 6605, 7149, 6879, 7170, 7203, 7169, 7204, 6644, 6908, 6671, 6863, 6864, 7178, 7224, 6676, 6866, 7177, 7179, 7186, 6684, 6867, 6868, 6869, 6686, 7182, 6731, 7018, 6740, 6975, 6976, 6979, 6980, 6978, 6981, 6892, 6894, 6897, 6898, 7175, 7213, 7214, 7012, 7028, 7027, 7047, 6594, 7142, 6902, 7087, 7013, 6670, 6940, 6941, 6672, 6707, 6687, 6996, 6732, 7006, 6741, 7137, 7139, 7069, 7070, 7141, 7136, 6939, 6938, 6946, 7017, 6947, 6999, 6918, 7000, 7039, 7050, 7143, 6966, 6627, 7020, 6727, 6948, 6942, 6677, 6706, 6735, 6688, 6998, 6742, 6773, 7154, 6958, 6893, 6992, 6949, 6950, 7003, 7029, 7051, 7144, 7052, 6957, 6952, 6668, 6736, 6743, 7071, 6983, 6951, 6954, 7022, 7004, 7030, 7145, 7072, 6623, 6960, 6955, 6667, 6744, 7138, 6984, 6959, 6964, 6956, 7032, 7055, 6621, 6961, 6985, 6745, 7150, 6986, 6994, 6963, 6881, 6916, 6842, 6962, 6862, 6680, 6746, 7156, 6987, 6995, 6982, 6620, 6965, 6681, 6988, 7001, 6991, 6624, 6993, 6682, 6989, 7002, 7037, 6828, 6625, 6703, 6990, 6829, 6997, 6830, 7016, 6628, 6832, 6626, 6629, 7118, 7075, 7223, 6673, 6678, 6717, 7079, 7222, 7083, 7076, 7077, 7082, 7074, 6674, 6716, 7081, 7041, 7014, 7078, 7085, 7073, 7058, 7067, 7153, 6718, 7086, 7023, 6719, 7056, 7046, 7061, 7024, 7063, 7025, 7057)) AND (t_d.attribute_id IN (45)) AND (t_d.store_id = IFNULL(t_s.store_id, 0))