select a.res_klasse, b.klasse_navn, b.klasse_ant from resultat a, klasse b where a.res_klasse=b.res_klasse and a.termin_id= group by a.res_klasseYou 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 a.res_klasse' at line 1