SELECT 1 AS `status`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`created_at`, `e`.`updated_at`, `e`.`sku`, IFNULL(additional_brand_products.position_in_brand, 1000) AS `position_in_brand`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `e`.`required_options`, `e`.`name`, `e`.`short_description`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`manufacturer`, `e`.`manufacturer_value`, `e`.`image`, `e`.`small_image`, `e`.`thumbnail`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`url_key`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`swatch_image`, `e`.`tax_class_id`, `e`.`home_page_product_type`, `e`.`home_page_product_type_value`, `e`.`threshold_limit`, `cat_index`.`position` AS `cat_index_position`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_flat_1` AS `e` LEFT JOIN (SELECT `e`.`entity_id`, CASE WHEN (e.type_id = "configurable" AND !ISNULL(eav_parent_index_table.entity_id)) OR e.type_id = "grouped" OR e.type_id = "bundle" THEN eav_parent_index_table.value WHEN (e.type_id = "configurable" AND ISNULL(eav_parent_index_table.entity_id)) OR e.type_id = "simple" THEN eav_index_table.value ELSE null END AS "option_id" FROM `eav_attribute` AS `attribute_table` INNER JOIN `catalog_product_index_eav` AS `eav_index_table` ON attribute_table.attribute_id = eav_index_table.attribute_id AND eav_index_table.store_id = 1 INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = eav_index_table.entity_id LEFT JOIN `catalog_product_index_eav` AS `eav_parent_index_table` ON attribute_table.attribute_id = eav_parent_index_table.attribute_id AND eav_parent_index_table.store_id = 1 AND eav_parent_index_table.entity_id = e.entity_id AND eav_parent_index_table.source_id = e.entity_id WHERE (attribute_table.attribute_code = 'manufacturer') GROUP BY `eav_index_table`.`entity_id`) AS `eav_index_table_brand` ON eav_index_table_brand.entity_id = e.entity_id AND eav_index_table_brand.option_id = 30 LEFT JOIN `aw_sbb_additional_products` AS `additional_brand_products` ON additional_brand_products.product_id = e.entity_id AND additional_brand_products.brand_id = 6 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id='2' LEFT JOIN (SELECT SUM(order_item_table.qty_ordered) AS `qty_ordered`, `order_item_table`.`product_id` FROM `sales_order_item` AS `order_item_table` GROUP BY `order_item_table`.`product_id`) AS `qty_ordered_select` ON e.entity_id = qty_ordered_select.product_id LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (e.entity_id != '61333') AND (e.entity_id IN('21886', '22176', '22596', '23184', '23209', '23210', '23468', '23493', '23765', '23832', '24668', '24685', '24691', '24697', '24714', '24738', '24803', '24921', '24978', '25063', '25109', '25155', '25487', '29119', '29640', '29819', '30017', '30081', '30152', '30240', '30261', '30286', '30343', '30425', '30652', '30904', '30917', '30934', '30945', '30997', '31077', '31088', '31110', '31314', '31317', '31390', '31463', '31626', '31667', '31713', '31768', '31805', '31860', '31960', '31973', '31979', '31996', '32007', '32050', '32057', '32093', '32099', '32112', '32179', '32243', '32284', '32339', '32404', '32522', '32529', '32536', '32543', '32562', '32578', '32606', '32614', '32622', '32633', '32766', '32944', '33059', '33080', '33101', '33112', '33123', '33134', '33155', '33176', '33197', '33218', '33269', '33290', '33321', '33352', '33393', '33434', '33455', '33476', '33497', '34791', '34864', '35177', '35208', '35249', '35383', '35426', '35510', '35794', '35819', '35880', '35918', '36090', '36109', '36195', '45444', '45481', '45536', '45917', '45971', '46013', '46119', '46163', '46188', '46240', '46321', '46349', '46362', '46532', '46574', '46632', '46688', '47742', '47761', '47775', '47795', '47810', '59901', '60761', '60798', '61130', '61185', '61193', '61209', '61213', '61221', '61226', '61230', '61231', '61240', '61244', '61268', '61278', '61280', '61283', '61284', '61285', '61286', '61287', '61288', '61289', '61290', '61291', '61292', '61293', '61294', '61295', '61296', '61297', '61298', '61299', '61300', '61301', '61302', '61303', '61304', '61305', '61306', '61307', '61308', '61330', '61331', '61332', '61333', '61334', '61336', '61337', '61338', '61339', '61340', '61341', '61342', '61343', '61344', '61346', '61347', '61349', '61351', '61353', '61355', '61357', '61358', '61359', '61360', '61368', '61369', '61370', '61371', '61372', '61373', '61374', '61500', '61501', '61502', '61503', '61504', '61505', '61506', '61507', '61508', '61509', '61510', '61511', '61512', '61513', '61514', '61515', '61516', '61517', '61518', '61519', '61520', '61521', '61522', '61523', '61524', '61525', '61526', '61527', '61528', '61529', '61530', '61531', '61532', '61533', '61534', '61535', '61536', '61537', '61538', '61539', '61540', '61542', '61544', '61545', '61546', '61547', '61548', '61549', '61550', '61551', '61552', '61553', '61554', '61555', '61556', '61557', '61558', '61559', '61560', '61561', '61562', '61563', '61564', '61565', '61566', '61567', '61568', '61569', '61570', '61571', '61572', '61573', '61577', '62172', '62173', '62175', '62176', '62177', '62178')) GROUP BY `e`.`entity_id` ORDER BY SUM(qty_ordered_select.qty_ordered) DESC LIMIT 10An error has happened during application run. See exception log for details.