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 (3289, 3415, 4081, 1813, 3079, 4522, 2401, 4456, 3583, 1105, 217, 721, 1408, 1990, 41675, 2647, 3889, 46071, 44086, 44089, 1183, 1444, 1912, 2191, 2500, 2719, 3229, 34022, 3868, 46403, 4084, 4510, 4811, 41708, 46074, 901, 1264, 1411, 1900, 2296, 2599, 2941, 3208, 33974, 3748, 44794, 4333, 4504, 4724, 41744, 46089, 265, 724, 1108, 1510, 1837, 2335, 2524, 3082, 33953, 3655, 4144, 4459, 4564, 41777, 46513, 220, 790, 1213, 1657, 1993, 2416, 3130, 33998, 34172, 3817, 34316, 4159, 4480, 4591, 41807, 313, 739, 1162, 1465, 2020, 2560, 2857, 3109, 34121, 3700, 34280, 4351, 4498, 41828, 583, 997, 1282, 2107, 2452, 2815, 3169, 34064, 3604, 34229, 4123, 4486, 358, 973, 1357, 1489, 2371, 2617, 2650, 3262, 3625, 4312, 4492, 403, 862, 1384, 1534, 1978, 2272, 2404, 2797, 3787, 3919, 4414, 4516, 41939, 688, 928, 1336, 1726, 1933, 2056, 2674, 3337, 3772, 4099, 4465, 47558, 41963, 529, 1045, 1774, 1816, 2008, 2488, 2833, 3586, 4216, 4471, 47579, 41990, 457, 1024, 1597, 1963, 2173, 2632, 2842, 3856, 3892, 4237, 41888, 520, 41246, 1945, 2287, 2539, 2950, 41702, 472, 1579, 2143, 2608, 2767, 44817, 4300, 640, 2911, 44738, 4384, 661, 2080, 37562, 45978, 4441, 41678, 1828, 2311, 46719, 47329, 46039, 1864, 47341, 44974, 46495, 47377, 47389, 47401, 47407, 47413, 47416, 47437, 226, 271, 316, 361, 427, 460, 475, 532, 598, 700, 727, 41163, 43214, 1033, 1090, 1123, 1168, 1186, 1270, 1381, 1387, 1414, 1450, 1522, 47079, 1588, 1612, 1663, 1750, 1795, 1822, 1843, 1873, 1906, 1918, 1948, 46492, 1981, 2011, 2023, 2110, 2152, 44695, 2275, 2299, 2314, 2338, 2374, 2407, 2425, 2476, 4715, 2542, 2563, 2626, 2635, 2653, 2686, 2728, 2800, 2818, 2860, 2914, 3088, 3127, 3133, 3181, 3220, 3244, 3283, 3589, 3622, 37028, 44973, 3766, 3775, 3793, 3850, 8664, 3886, 3922, 4087, 4102, 4147, 4201, 4279, 4324, 4342, 4378, 4444, 4474, 4507, 4513, 4570, 4612, 4778, 4826, 33968, 33992, 34004, 34115, 34166, 34223, 34319, 37580, 41249, 41681, 41714, 41759, 41810, 41831, 41960, 41987, 44092, 44820, 45019, 45981, 46042, 46077, 46092, 46412, 46498, 46516, 46722, 47332, 47344, 47439, 47540, 47484, 47493, 47561, 47582, 229, 274, 319, 364, 406, 463, 481, 535, 592, 646, 703, 730, 41525, 868, 1042, 1060, 1111, 1171, 1204, 1267, 1342, 1360, 1417, 1519, 1570, 1591, 1609, 1693, 1735, 1825, 1840, 45551, 1909, 45858, 1951, 1972, 1987, 1999, 2014, 2026, 2113, 2155, 2278, 2302, 2317, 41166, 2398, 2410, 2419, 2464, 43462, 2545, 2590, 2620, 2638, 2665, 2677, 2725, 2773, 2803, 2821, 2848, 2866, 2917, 3094, 3115, 3148, 3187, 45873, 3238, 3280, 3592, 3607, 3637, 3676, 3745, 3757, 3784, 3808, 3829, 3859, 3871, 3925, 4096, 4129, 4276, 4315, 4366, 4447, 4477, 44747, 40082, 4567, 4609, 4733, 42967, 47728, 47707, 34001, 34055, 34082, 47742, 47748, 34322, 37592, 44647, 41753, 41783, 41948, 41984, 44095, 45548, 44983, 46095, 46406, 46501, 46896, 47335, 47347, 47371, 47383, 47395, 47442, 47543, 47487, 47564, 256, 268, 322, 367, 409, 466, 484, 538, 625, 694, 736, 841, 47648, 1078, 44812, 1195, 46820, 1393, 1525, 1537, 1582, 1615, 1675, 1741, 1858, 44860, 45849, 1969, 2002, 2017, 2029, 2089, 2140, 2167, 2305, 2365, 2380, 2413, 2422, 2473, 44698, 2566, 44009, 2641, 2656, 2776, 2806, 2851, 2920, 3091, 3124, 3193, 3241, 3274, 3610, 3652, 3688, 3742, 3751, 3778, 3790, 3826, 3865, 3880, 3928, 4132, 4153, 4168, 4240, 4345, 4357, 4423, 4450, 44753, 4576, 4606, 4784, 42964, 47725, 47691, 47734, 47592, 34067, 47745, 47751, 37568, 46643, 44650, 41747, 41837, 41981, 47629, 44989, 46098, 46728, 47338, 47350, 47398, 47445, 47528, 47546, 47490, 47499, 47567, 47588, 223, 277, 370, 415, 469, 487, 541, 595, 652, 697, 733, 796, 47651, 1030, 1051, 1153, 1177, 1198, 1273, 1330, 1348, 1399, 1423, 1540, 1660, 1744, 1861, 45664, 45852, 1957, 1975, 2032, 2092, 2116, 2164, 2284, 2308, 2368, 2377, 2428, 43459, 2575, 2623, 2644, 2683, 47075, 2809, 2827, 2854, 2872, 2923, 3103, 3112, 3163, 3175, 45867, 3253, 3286, 43468, 3673, 3706, 3754, 3781, 3796, 3823, 3862, 3874, 4093, 4135, 4156, 4174, 4243, 4336, 4363, 4426, 44806, 44418, 4573, 4600, 42961, 47722, 47694, 47737, 47595, 34097, 34124, 47754, 37571, 41723, 41750, 41978, 44992, 46086, 46101, 46415, 47531, 47502, 47570, 47591, 253, 280, 328, 418, 490, 544, 622, 655, 706, 835, 47654, 1057, 1135, 1192, 1276, 1297, 1426, 1543, 1621, 1681, 1747, 1783, 1846, 1867, 45667, 45855, 2119, 2146, 47078, 43607, 2383, 2431, 2518, 2554, 2593, 2629, 2713, 2782, 2926, 3100, 3118, 3166, 3172, 3217, 3256, 3265, 22730, 45930, 3721, 3760, 3802, 3847, 8661, 47757, 4177, 4246, 4327, 4381, 4399, 4429, 44750, 46799, 4579, 4594, 46808, 47719, 47688, 47740, 47598, 34079, 34148, 34187, 34295, 37577, 41741, 41822, 41843, 45013, 46519, 46488, 47505, 47573, 232, 283, 331, 376, 424, 493, 547, 601, 658, 709, 820, 47657, 1069, 1126, 1201, 1279, 1372, 1402, 1624, 1678, 1852, 1885, 45670, 45861, 46680, 2038, 2122, 2149, 2386, 2434, 2461, 2521, 2569, 2668, 2716, 2878, 2929, 3235, 44656, 3616, 3733, 3763, 3814, 3820, 42952, 3937, 4117, 4189, 4282, 4360, 4432, 44744, 46802, 4588, 4597, 46811, 47716, 47703, 34007, 47601, 43618, 34163, 34175, 34334, 37583, 41849, 44995, 46507, 46522, 47508, 47576, 250, 310, 334, 430, 496, 550, 604, 47316, 712, 814, 47660, 1099, 1114, 47082, 1207, 1405, 1432, 4709, 1513, 1549, 1627, 1666, 1729, 1789, 1882, 45673, 45864, 2041, 2101, 2389, 2437, 2515, 2596, 2710, 2881, 2932, 3085, 3121, 3145, 3223, 3250, 3661, 3718, 3769, 3811, 3877, 3940, 47469, 46805, 47731, 47706, 34010, 47685, 34109, 34169, 34202, 34301, 34337, 37586, 41957, 41975, 44986, 46510, 47511, 47611, 235, 286, 340, 382, 436, 499, 553, 589, 47319, 715, 829, 43211, 1072, 1138, 1210, 1441, 1552, 1630, 1669, 1768, 1792, 1870, 45740, 1921, 2128, 2161, 2392, 2470, 2581, 2695, 2791, 2884, 3139, 3649, 3727, 3805, 3883, 4585, 33965, 47713, 34013, 47682, 34118, 34184, 34304, 34340, 37589, 41771, 45007, 46528, 47514, 47671, 244, 289, 388, 439, 502, 610, 47322, 718, 811, 919, 1048, 1129, 1189, 1555, 1633, 1765, 1798, 45652, 1879, 1915, 2131, 2170, 2395, 2479, 2572, 2692, 2794, 4678, 2938, 3097, 46989, 3670, 4745, 33956, 47710, 34034, 34145, 34217, 34307, 34343, 37574, 45004, 46531, 47517, 238, 292, 346, 391, 445, 505, 613, 47327, 907, 1117, 1435, 1636, 1732, 1801, 45658, 1894, 2134, 4682, 2482, 2698, 45943, 3232, 42299, 3682, 3853, 45976, 4748, 33959, 33989, 34019, 47697, 34142, 34199, 39911, 41732, 41762, 41861, 44998, 46534, 47549, 247, 295, 394, 448, 508, 616, 46036, 922, 1144, 1561, 1639, 1690, 1753, 1804, 45655, 1888, 2137, 2485, 2701, 3136, 45882, 3685, 3838, 4751, 45676, 47700, 34226, 34313, 41735, 45001, 47552, 241, 301, 352, 397, 451, 511, 568, 619, 802, 916, 1159, 1564, 1642, 1699, 45661, 2362, 45876, 42949, 3724, 4207, 33971, 33977, 34028, 41738, 45010, 47555, 355, 400, 454, 514, 586, 913, 1147, 1645, 1759, 1891, 2707, 45885, 3634, 3739, 4180, 4267, 4814, 34052, 44977, 259, 307, 412, 628, 47231, 904, 1573, 1600, 1684, 45940, 1897, 4685, 46758, 45879, 3679, 4270, 4820, 33983, 34091, 45016, 47646, 421, 631, 47234, 1654, 1771, 6254, 45888, 45933, 4841, 34094, 47668, 442, 580, 634, 47237, 925, 2689, 4165, 4823, 44003, 34043, 637, 47276, 1156, 6257, 4198, 4844, 44006, 34136, 838, 47674, 1141, 34160, 844, 44294, 45245, 34058, 43621, 34190, 850, 1096, 44415, 46935, 34214, 853, 45623, 46938, 43616, 47634, 859, 44285, 44291, 46010, 46013, 46016, 46019, 46022, 46025, 46028, 46031)) AND (t_d.attribute_id IN (45)) AND (t_d.store_id = IFNULL(t_s.store_id, 0))