Expected 'BY' after 'GROUP'.

Your SQL statement includes a GROUP clause instead of a GROUP BY clause. BY may be either misspelled or missing.