Prijavite pogrešku

Zahvaljujemo vam na vašoj spremnosti da prijavite pogrešku

Nakon pritiska na tipku prikažite mišem, gdje je greška
Prikaži na zaslonu
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY typ HAVING id_ingredience='28' ORDER BY pocet DESC LIMIT 1' at line 3

SELECT SUM(body) pocet, typ, id_ingredience
            FROM (SELECT * FROM ps_ingredience_body ORDER BY id_ingredience='28' DESC) b
            WHERE id_product= GROUP BY typ HAVING id_ingredience='28' ORDER BY pocet DESC LIMIT 1