1054 -
SELECT DISTINCT p.product_grouper_id, p.products_id FROM products p INNER JOIN products_description pd on p.products_id = pd.products_id and pd.language_id = 0 INNER JOIN categories c on c.categories_id = main_category_id LEFT JOIN mods_product_groupers mpg on p.product_grouper_id = mpg.id AND mpg.is_rentable = 0 where p.products_status = 1 and c.categories_status = 1 and p.is_rentable = 0 and (p.products_price > 0 or p.show_priceless = 1) and ((p.products_quantity - IF(p.products_min_stock_to_sell IS NULL,0,p.products_min_stock_to_sell)) > 0 or p.products_ignore_stock = 1) and p.configurable_products_only = 0 and p.manufacturers_id in (574aamp) and p.product_grouper_id is not null GROUP BY p.products_id ORDER BY product_grouper_id
[TEP STOP]