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 t.crimeyearid, cy.title_short ORDER BY t.crimeyearid' at line 24

SELECT t.crimeyearid, cy.title_short AS yeartitle ,asb_total ,bur_total ,rob_total ,veh_total ,vio_total ,shop_total ,(other_total + shop_total + drug_total + cda_total + pdw_total + othertheft_total + weap_total + bike_total + pers_total + ord_total) as other_total ,drug_total ,cda_total ,pdw_total ,othertheft_total ,other_total as misc_total ,bike_total ,weap_total ,pers_total ,ord_total ,all_total FROM total_cty t INNER JOIN crimeyear cy ON (cy.ID = t.crimeyearid) WHERE t.cty=2235 AND cy.ID BETWEEN 0 AND GROUP BY t.crimeyearid, cy.title_short ORDER BY t.crimeyearid