Tilemill automatically adds a "SELECT * FROM" and trailing ";"
to your query.
So if you test your queries in pgadmin you should do in the form
of: "SELECT * FROM (SELECT city.geoname FROM public.city WHERE
city.generiterm = 'Community (1)');" and only copy the sub query
including the parentheses to Tilemill and take extra care that you
don't accidentally put any semicolon into your TileMill sub
Your combined " ... WHERE ... ; WHERE ... ; "
query is definitely wrong.