Бестселлеры 2013 года

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 'GROUP BY op.products_id ORDER BY allbooks DESC LIMIT 0 , 20' at line 19

SELECT op.products_id, pd.products_name, pd.products_description, p.products_price, p.products_image, p.quantity_co+p.quantity_cw AS products_quantity, SUM( op.products_quantity ) AS allbooks FROM orders_products op LEFT JOIN products p ON p.products_id = op.products_id LEFT JOIN orders o ON op.orders_id = o.orders_id LEFT JOIN products_description pd ON p.products_id = pd.products_id WHERE p.products_donation <1 AND p.products_org <1 AND products_gift_card <1 AND ( o.orders_status =3 OR o.orders_status =8 ) AND ( o.date_purchased BETWEEN '2013-01-01' AND '2013-12-31' ) AND pd.language_id = GROUP BY op.products_id ORDER BY allbooks DESC LIMIT 0 , 20

[TEP STOP]