select count(city) from table where 条件 group by city
如果<%@ contentType="text/html; charset=GBK"%>ResultSet rs = statement.executeQuery(sql);处需要连接数据库的代码怎么写。