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 `mg_catalog_category_entity_varchar` AS `t_d` INNER JOIN `mg_catalog_category_entity` AS `e` ON e.entity_id = t_d.entity_id LEFT JOIN `mg_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 (3, 4, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 1894, 2026, 6, 50, 63, 65, 78, 1654, 1695, 1763, 1826, 1808, 1279, 453, 512, 522, 851, 540, 1534, 1573, 1409, 932, 1363, 1499, 1503, 1605, 1895, 2027, 8, 51, 64, 80, 1655, 1696, 1764, 1827, 1809, 1280, 454, 518, 531, 864, 541, 1553, 1574, 1410, 933, 1364, 1500, 1504, 1606, 1896, 2028, 32, 52, 67, 81, 1656, 1697, 1779, 1828, 1810, 1281, 455, 876, 542, 1563, 1575, 1411, 934, 1365, 1501, 1505, 1637, 1897, 2029, 33, 53, 82, 1657, 1698, 1786, 1938, 1811, 1282, 884, 543, 1576, 1412, 935, 1366, 1502, 1512, 2030, 34, 54, 83, 1658, 1699, 1943, 1812, 1283, 888, 544, 1577, 1413, 936, 1367, 2031, 35, 55, 84, 1659, 1788, 1946, 1813, 896, 545, 1578, 1414, 937, 1368, 2032, 36, 56, 85, 1660, 1814, 903, 1415, 938, 1369, 2033, 37, 57, 86, 2011, 1815, 909, 1416, 939, 1370, 2034, 38, 425, 87, 1816, 1956, 564, 940, 1371, 39, 74, 88, 1817, 565, 941, 1372, 40, 1793, 1818, 942, 1373, 41, 1893, 1819, 943, 42, 1820, 944, 43, 1821, 945, 44, 1822, 946, 45, 1914, 1823, 947, 46, 1917, 1824, 948, 48, 1920, 1825, 949, 49, 1923, 950, 1932, 951, 407, 952, 953, 1069, 1255, 1266, 108, 215, 156, 254, 224, 403, 241, 288, 291, 322, 190, 323, 104, 372, 329, 378, 426, 430, 431, 440, 445, 471, 477, 500, 508, 79, 408, 450, 456, 461, 463, 513, 519, 523, 532, 548, 557, 611, 640, 657, 709, 761, 770, 852, 865, 877, 885, 889, 897, 904, 910, 969, 984, 989, 1015, 1112, 1238, 1189, 1261, 1097, 1162, 1197, 1202, 1207, 954, 1070, 1256, 1267, 1284, 1297, 1319, 1333, 1351, 1374, 1378, 1381, 1389, 1393, 1407, 1417, 1468, 1476, 1480, 1490, 1506, 1513, 1519, 1521, 1535, 1554, 1564, 1579, 1587, 1595, 1601, 1607, 1624, 1638, 1661, 1668, 1677, 1683, 1687, 1689, 1700, 1709, 1749, 1752, 1756, 1765, 1771, 1780, 1787, 1789, 1794, 1829, 1856, 1879, 77, 1898, 1903, 1907, 1915, 1918, 1921, 1924, 1933, 1939, 1944, 1947, 1957, 2012, 2035, 2048, 2039, 2051, 2056, 109, 216, 157, 255, 225, 404, 242, 289, 202, 292, 269, 351, 191, 324, 373, 330, 379, 427, 432, 441, 446, 472, 478, 501, 509, 409, 451, 457, 462, 464, 514, 520, 524, 533, 549, 558, 612, 645, 661, 710, 762, 771, 853, 866, 878, 886, 890, 898, 905, 911, 970, 985, 990, 1057, 1113, 1244, 1190, 1262, 1098, 1163, 1198, 1203, 1215, 955, 1071, 1257, 1268, 1285, 1298, 1321, 1334, 1352, 1375, 1379, 1382, 1390, 1394, 1408, 1418, 1469, 1477, 1481, 1491, 1507, 1514, 1520, 1522, 1536, 1555, 1565, 1580, 1588, 1596, 1602, 1608, 1625, 1639, 1662, 1669, 1678, 1684, 1688, 1690, 1705, 1710, 1750, 1753, 1757, 1766, 1772, 1781, 1790, 1830, 1857, 1880, 76, 1899, 1904, 1908, 1916, 1919, 1922, 1925, 1934, 1940, 1945, 1949, 2013, 2036, 2049, 2040, 2052, 2057, 110, 217, 158, 256, 226, 405, 243, 290, 203, 293, 301, 352, 192, 325, 374, 331, 380, 428, 433, 442, 447, 473, 479, 502, 510, 410, 452, 458, 465, 515, 521, 525, 534, 550, 559, 613, 649, 662, 711, 772, 854, 867, 879, 887, 891, 899, 906, 912, 971, 986, 991, 1058, 1114, 1248, 1191, 1099, 1164, 1199, 1204, 1231, 956, 1072, 1258, 1269, 1286, 1299, 1323, 1335, 1353, 1376, 1380, 1383, 1391, 1395, 1419, 1470, 1478, 1482, 1492, 1508, 1515, 1523, 1537, 1556, 1566, 1581, 1589, 1597, 1603, 1609, 1626, 1663, 1670, 1679, 1685, 1691, 1706, 1711, 1751, 1754, 1758, 1767, 1773, 1782, 1791, 1831, 1881, 75, 1900, 1905, 1909, 1926, 1935, 1941, 1952, 1950, 2014, 2037, 2050, 2041, 2053, 2058, 111, 218, 159, 257, 227, 406, 244, 396, 204, 294, 302, 354, 193, 326, 375, 332, 381, 429, 434, 443, 448, 503, 511, 411, 459, 466, 516, 526, 535, 551, 560, 614, 654, 663, 712, 773, 855, 868, 880, 892, 900, 907, 914, 972, 987, 992, 1059, 1115, 1192, 1100, 1165, 1200, 1205, 957, 1073, 1259, 1270, 1287, 1300, 1324, 1339, 1354, 1377, 1384, 1392, 1396, 1420, 1471, 1479, 1483, 1493, 1509, 1516, 1524, 1538, 1557, 1567, 1582, 1590, 1598, 1604, 1610, 1627, 1664, 1671, 1680, 1686, 1692, 1707, 1755, 1759, 1768, 1774, 1783, 1792, 1832, 1882, 1901, 1906, 1910, 1927, 1936, 1942, 2015, 2038, 2042, 2054, 2059, 113, 219, 160, 258, 228, 245, 397, 205, 295, 303, 355, 194, 327, 376, 333, 382, 435, 444, 449, 504, 412, 460, 467, 517, 527, 536, 552, 561, 656, 664, 713, 774, 856, 869, 881, 893, 901, 908, 915, 973, 988, 993, 1060, 1116, 1193, 1101, 1166, 1201, 1206, 958, 1074, 1260, 1271, 1288, 1301, 1326, 1340, 1355, 1385, 1397, 1421, 1472, 1484, 1494, 1510, 1517, 1525, 1539, 1558, 1568, 1583, 1591, 1599, 1611, 1628, 1665, 1672, 1681, 1693, 1708, 1760, 1769, 1775, 1784, 1833, 1883, 1902, 1911, 1928, 1937, 2016, 2043, 2055, 2060, 112, 220, 161, 259, 229, 246, 398, 206, 296, 304, 356, 195, 328, 377, 334, 383, 436, 505, 413, 468, 528, 537, 553, 562, 665, 714, 775, 857, 870, 882, 894, 902, 916, 974, 994, 1061, 1117, 1194, 1102, 1167, 959, 1075, 1263, 1272, 1289, 1302, 1327, 1341, 1356, 1386, 1398, 1473, 1495, 1511, 1518, 1526, 1540, 1559, 1569, 1584, 1592, 1600, 1612, 1629, 1666, 1673, 1682, 1716, 1761, 1770, 1776, 1785, 1834, 1912, 1930, 2017, 2044, 117, 221, 162, 260, 230, 247, 399, 207, 297, 305, 357, 196, 361, 335, 384, 437, 414, 469, 529, 538, 554, 600, 666, 748, 776, 858, 871, 883, 895, 917, 975, 995, 1062, 1118, 1195, 1103, 1168, 960, 1076, 1264, 1273, 1290, 1303, 1328, 1342, 1357, 1387, 1399, 1474, 1496, 1541, 1560, 1570, 1585, 1593, 1613, 1630, 1667, 1674, 1762, 1777, 1835, 1913, 1931, 2018, 2045, 118, 222, 163, 261, 231, 248, 400, 208, 298, 306, 358, 197, 362, 336, 385, 438, 415, 470, 530, 539, 555, 667, 777, 859, 872, 918, 976, 996, 1063, 1119, 1196, 1104, 1169, 961, 1077, 1265, 1274, 1291, 1304, 1329, 1343, 1358, 1388, 1400, 1475, 1497, 1542, 1561, 1571, 1586, 1594, 1614, 1631, 1778, 1836, 2019, 2046, 119, 223, 164, 262, 232, 249, 401, 209, 299, 307, 359, 198, 363, 337, 386, 439, 416, 556, 778, 860, 873, 977, 997, 1064, 1120, 1105, 1170, 962, 1078, 1275, 1292, 1306, 1330, 1344, 1359, 1401, 1498, 1543, 1562, 1572, 1615, 1632, 1837, 2020, 2047, 120, 165, 263, 233, 250, 402, 210, 300, 308, 360, 199, 364, 338, 387, 417, 779, 861, 874, 978, 998, 1065, 1121, 1106, 1171, 963, 1079, 1276, 1293, 1307, 1331, 1345, 1360, 1402, 1544, 1616, 1633, 2021, 121, 166, 264, 234, 251, 211, 309, 200, 365, 339, 388, 418, 780, 862, 875, 979, 999, 1066, 1122, 1107, 1172, 964, 1080, 1277, 1294, 1308, 1332, 1346, 1361, 1403, 1545, 1617, 1634, 2022, 122, 167, 265, 235, 252, 212, 310, 201, 366, 340, 389, 419, 781, 863, 920, 980, 1001, 1067, 1123, 1108, 1173, 965, 1081, 1278, 1295, 1309, 1347, 1362, 1404, 1546, 1618, 1635, 2023, 125, 168, 266, 236, 253, 213, 311, 367, 341, 390, 420, 782, 921, 981, 1002, 1068, 1124, 1109, 1174, 966, 1082, 1296, 1310, 1348, 1547, 1619, 1636, 2024, 126, 169, 267, 237, 214, 312, 368, 342, 391, 421, 922, 982, 1003, 1185, 1125, 1110, 1175, 967, 1083, 1312, 1349, 1548, 1620, 2025, 127, 170, 238, 313, 369, 343, 392, 422, 923, 983, 1004, 1186, 1111, 1176, 968, 1084, 1314, 1350, 1549, 1621, 128, 171, 239, 314, 370, 344, 393, 423, 924, 1005, 1187, 1127, 1177, 1085, 1318, 1550, 1622, 129, 172, 240, 315, 371, 345, 424, 925, 1006, 1188, 1128, 1178, 1551, 1623, 130, 173, 270, 316, 346, 926, 1007, 1552, 131, 174, 271, 317, 347, 927, 1008, 132, 175, 272, 319, 348, 928, 1009, 133, 176, 273, 320, 349, 929, 1010, 134, 177, 274, 321, 350, 930, 1011, 135, 178, 275, 931, 1012, 136, 179, 276, 1013, 137, 180, 277, 1014, 138, 181, 278, 1024, 139, 182, 279, 1050, 140, 183, 280, 1087, 141, 184, 281, 1088, 142, 185, 285, 1089, 143, 186, 286, 1090, 144, 187, 287, 1091, 145, 188, 1092, 146, 189, 1093, 147, 1139, 148, 149, 150, 151, 152, 153, 154, 1968, 114, 1979, 1985, 1990, 1995, 2001, 2006, 566, 581, 590, 592, 594, 601, 615, 629, 622, 635, 641, 646, 650, 655, 668, 676, 679, 683, 687, 693, 698, 703, 715, 727, 732, 737, 740, 749, 763, 766, 783, 797, 805, 809, 812, 830, 836, 844, 847, 849, 1030, 1016, 1025, 1051, 1136, 1158, 1143, 1154, 1142, 1140, 1130, 1180, 1179, 1182, 1208, 1216, 1232, 1239, 1245, 1249, 1405, 1422, 1428, 1447, 1460, 1443, 1485, 1527, 1640, 1646, 1675, 1701, 1722, 1727, 1730, 1734, 1741, 1717, 1795, 1838, 1851, 1858, 1867, 1884, 1951, 1953, 1958, 1969, 1980, 1986, 1991, 1996, 2002, 2007, 567, 582, 591, 593, 595, 602, 616, 630, 623, 636, 642, 647, 651, 669, 677, 680, 684, 688, 694, 699, 704, 716, 728, 733, 738, 741, 750, 764, 767, 784, 798, 806, 810, 813, 831, 837, 845, 848, 850, 1031, 1017, 1026, 1052, 1137, 1160, 1144, 1155, 1153, 1141, 1131, 1181, 1183, 1209, 1217, 1233, 1240, 1246, 1250, 1406, 1423, 1429, 1448, 1461, 1444, 1486, 1528, 1641, 1647, 1676, 1702, 1723, 1728, 1731, 1735, 1742, 1718, 1796, 1839, 1859, 1868, 1885, 1954, 1316, 1981, 1987, 1992, 1997, 2003, 2008, 568, 583, 596, 603, 617, 631, 624, 637, 643, 648, 652, 670, 678, 681, 685, 689, 695, 700, 705, 717, 729, 734, 739, 742, 751, 765, 768, 785, 799, 807, 811, 814, 832, 838, 846, 1032, 1018, 1027, 1053, 1138, 1161, 1145, 1156, 1132, 1184, 1210, 1218, 1234, 1241, 1247, 1251, 1424, 1430, 1449, 1462, 1445, 1487, 1529, 1642, 1648, 1703, 1724, 1729, 1732, 1736, 1743, 1719, 1797, 1860, 1869, 1886, 1955, 1982, 1988, 1993, 1998, 2004, 2009, 569, 585, 597, 604, 618, 632, 625, 638, 644, 653, 671, 682, 686, 690, 696, 701, 706, 718, 730, 735, 743, 752, 769, 786, 800, 808, 815, 833, 839, 1033, 1019, 1028, 1054, 1146, 1157, 1133, 1211, 1219, 1235, 1242, 1252, 1425, 1431, 1450, 1463, 1446, 1488, 1530, 1643, 1649, 1704, 1725, 1733, 1737, 1744, 1720, 1798, 1861, 1870, 1887, 1320, 1983, 1989, 1994, 1999, 2005, 2010, 570, 586, 598, 605, 619, 633, 626, 639, 672, 691, 697, 702, 707, 719, 731, 736, 744, 753, 787, 801, 834, 840, 1034, 1020, 1029, 1055, 1147, 1134, 1212, 1236, 1243, 1253, 1426, 1432, 1451, 1464, 1454, 1489, 1531, 1644, 1650, 1712, 1726, 1738, 1745, 1721, 1799, 1862, 1871, 1888, 1322, 1984, 2000, 571, 587, 606, 620, 634, 627, 673, 692, 708, 720, 745, 754, 788, 802, 835, 841, 1035, 1021, 1056, 1148, 1135, 1213, 1237, 1254, 1427, 1433, 1452, 1465, 1532, 1645, 1651, 1713, 1739, 1746, 1800, 1864, 1872, 1889, 1325, 572, 588, 607, 621, 628, 674, 721, 746, 755, 789, 803, 842, 1036, 1022, 1149, 1214, 1434, 1453, 1466, 1533, 1652, 1714, 1740, 1747, 1801, 1865, 1873, 1890, 1336, 573, 589, 608, 675, 722, 747, 756, 790, 804, 843, 1037, 1023, 1150, 1224, 1435, 1455, 1467, 1653, 1715, 1748, 1802, 1866, 1874, 1891, 1337, 574, 609, 723, 757, 791, 827, 1038, 1151, 1225, 1436, 1456, 1803, 1875, 1338, 575, 610, 724, 758, 792, 828, 1039, 1152, 1226, 1437, 1457, 1804, 1876, 576, 725, 759, 793, 829, 1040, 1227, 1438, 1458, 1805, 1877, 577, 726, 760, 794, 1228, 1439, 1459, 1806, 1878, 578, 795, 1229, 1440, 1807, 579, 796, 1230, 1441, 580, 816, 1442, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 115, 1042, 1220, 1840, 1843, 1852, 1043, 1221, 1841, 1844, 1853, 1044, 1222, 1842, 1845, 1854, 1045, 1223, 1846, 1855, 1046, 1847, 1047, 1848, 1048, 1849, 1049, 1850, 116)) AND (t_d.attribute_id IN ('45')) AND (t_d.store_id = IFNULL(t_s.store_id, 0))