Fatal error: Uncaught Exception: Error: 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 'DISTINCT ps.product_id, (SELECT AVG(rating) FROM oc_review r1 WHERE r1.product_i' at line 4<br />Error No: 1064<br />SELECT (SELECT GROUP_CONCAT(pc.category_id) FROM oc_product_to_category pc WHERE pc.product_id = p.product_id) AS categories, (SELECT GROUP_CONCAT(op.option_id) FROM oc_product_option op WHERE op.product_id = p.product_id) AS options, DISTINCT ps.product_id, (SELECT AVG(rating) FROM oc_review r1 WHERE r1.product_id = ps.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM oc_product_special ps LEFT JOIN oc_product p ON (ps.product_id = p.product_id) LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '1' AND ((ps.date_start = in /home/peppermill/public_html/system/library/db/mysqli.php on line 40