There has been an error processing your request

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND ( price_index.final_price  <  price_index.price*0.85)' at line 4, query was: SELECT DISTINCT `e`.`attribute_set_id` FROM `catalog_product_flat_2` AS `e`
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='2' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2'
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '2' AND price_index.customer_group_id = 0
 INNER JOIN `catalog_category_product` AS `amlanding_cp` ON amlanding_cp.product_id = e.entity_id AND amlanding_cp.category_id IN ('', '1', '2', '8', '9', '11', '12', '35', '140', '220', '266', '314', '326', '343', '344', '351', '364', '365', '371', '381', '393', '394', '395', '396', '398', '401', '402', '406', '407', '419', '422', '447', '485', '494', '495', '515', '7', '10', '13', '26', '30', '36', '37', '38', '39', '49', '50', '51', '52', '53', '63', '141', '143', '145', '146', '148', '152', '153', '167', '171', '172', '176', '182', '183', '187', '192', '193', '194', '195', '196', '197', '201', '205', '206', '221', '222', '223', '227', '232', '238', '244', '245', '246', '248', '249', '250', '251', '256', '267', '268', '269', '270', '271', '272', '273', '274', '275', '276', '277', '278', '279', '280', '283', '304', '306', '307', '308', '315', '318', '327', '328', '352', '353', '366', '367', '368', '369', '370', '378', '379', '397', '403', '404', '405', '408', '409', '417', '427', '448', '449', '450', '451', '452', '453', '454', '455', '456', '457', '472', '486', '487', '488', '496', '497', '498', '499', '500', '501', '502', '503', '504', '505', '506', '512', '513', '514', '516', '517', '518', '526', '527', '531', '532', '533', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '29', '32', '33', '34', '40', '41', '42', '43', '46', '57', '58', '59', '60', '61', '64', '65', '66', '67', '68', '142', '147', '149', '150', '151', '154', '155', '156', '157', '158', '159', '160', '161', '162', '168', '169', '170', '173', '174', '175', '177', '178', '179', '180', '181', '184', '185', '186', '188', '189', '190', '191', '198', '199', '200', '202', '203', '204', '207', '208', '209', '210', '211', '212', '213', '214', '215', '216', '217', '218', '219', '224', '225', '226', '228', '229', '230', '231', '233', '234', '235', '236', '237', '239', '240', '241', '242', '243', '252', '253', '254', '255', '257', '258', '259', '260', '261', '262', '263', '264', '265', '281', '282', '284', '285', '305', '309', '310', '311', '312', '313', '317', '319', '320', '321', '322', '323', '324', '325', '329', '330', '331', '332', '333', '334', '335', '336', '337', '338', '339', '340', '341', '342', '354', '355', '356', '357', '363', '372', '373', '374', '375', '376', '377', '399', '412', '414', '415', '416', '418', '420', '421', '423', '424', '425', '426', '428', '429', '430', '431', '432', '439', '440', '458', '459', '460', '461', '462', '463', '464', '465', '466', '467', '468', '469', '470', '471', '473', '474', '475', '476', '477', '478', '479', '480', '481', '482', '483', '484', '489', '490', '507', '510', '511', '519', '520', '521', '522', '523', '524', '525', '534', '25', '27', '28', '31', '163', '164', '165', '166', '400', '434', '435', '436', '437', '438', '441', '442', '443', '444', '445', '446', '508', '509') WHERE (e.status = 1) AND (()) AND ( price_index.final_price  <  price_index.price*0.85)
Trace:

Error log record number: 1311113765900