When you are using any of the aggregate functions, anything that is not getting aggregated must be included in your GROUP BY list. This is common across all relational database SQL variants.
(FYI, double dash is a "comment out" syntax in most SQL languages)
So in your case you have the following:
SELECT name, --no aggregate
city, --no aggregate
GROUP BY name, city;