我写的语句,但是报错,不知道应该怎么写合适,以至于我可以不显示上海的,
group by 分组查询
后面要跟条件是使用
having city <> '上海'
where city <> '上海'
select city as 城市,count(1) as 中标数 from 表名 where city<> '上海' group by city
你的where city!='上海' 不会是放在group by 后面吧?
放在表名后面。