Query issues, for the life of me i cant figure out what is wrong with this query
HAVING distance ='10'
GROUP BY c.ancient,
c.ant_name,
p.upper,
p.name,
ERROR 1064 (42000): 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 c.city_id, c.city_name, p.prop_ynow_id, p.Name, pr.PRE_Ident SELECT dis' at line 1