Попробуйте выполнить этот же запрос в phpmyadmin
SELECT op.product_id, COUNT(*) AS total FROM order_product op LEFT JOIN `order` o ON (op.order_id = o.order_id) LEFT JOIN `product` p ON (op.product_id = p.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE o.order_status_id > '0' AND p.status = '1' AND p.date_available <= NOW() AND op.order_id IN (135, 122, 464, 474, 86, 112, 117, 118, 142, 165, 170, 186, 187, 190, 205, 210, 233, 251, 256, 262, 266, 276, 469, 285, 286, 294, 305, 306, 312, 317, 333, 345, 397, 416, 417, 420, 442, 478, 483, 485, 494, 495, 501, 504, 515, 518, 538, 549, 580, 596, 608, 622, 624, 628, 629, 633, 637, 638, 652, 663, 665, 681, 690, 693, 715, 717, 723, 739, 742, 749, 752, 753, 758, 765, 770, 776, 787, 790, 804, 835, 851, 868, 872, 879, 881, 893, 896, 900, 901, 904, 919, 925, 933, 937, 939, 943, 952, 955, 970, 971, 972, 973, 980, 985, 988, 989, 992, 994, 1022, 1025, 1032, 1033, 1046, 1044, 1047, 1049, 1071, 1072, 1092, 1096, 1103, 1115, 1120, 1131, 1138, 1139, 1141, 1146, 1151, 1165, 1168, 1169, 1171, 1173, 1186, 1190, 1193, 1195, 1202, 1210, 1236, 1277, 1279, 1283, 1285, 1287, 1288, 1289, 1297, 1303, 1308, 1313, 1314, 1320, 1332, 1336, 1337, 1342, 1378, 1388, 1392, 1400, 1410, 1412, 1414, 1424, 1425, 1426, 1427, 1428, 1429, 1444, 1460, 1466, 1472, 1484, 1489, 1503, 1505, 1507, 1508, 1524, 1533, 1534, 1536, 1539, 1553, 1557, 1559,) AND op.product_id != '103' AND p2s.store_id = '0' GROUP BY op.product_id ORDER BY total DESC LIMIT 4