求一sql写法 select a.sf as 身份,城市数=(select count(*) from city where sf=a.id) from sf awhere sf in('浙江','上海','北京') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.sf as 省份,count(b.city) from sf a,city b where a.sf=b.sf group by a.sf select a.sf as 省份,count(b.city) from sf a,city b where a.id=b.sf group by a.sf select b.sf,a.num from (select sf,num=count(sf) from city group by sf) aleft join sf b on a.sf=b.id select a.sf as 省份,count(b.city) as 城市数 from sf a,(select count(city),sf from city group by sf)bwhere a.sf=b.sf select a.sf ,count(b.sf) from sf a ,city b where a.id=b.sf group by a.sf select a.sf province, count(c.city) as n from sf a join city c on a.id=c.sf group by c.sf 文本文档导入到sql中列的问题 sql语句求助 【求助!】 有一个表格,有数万条记录,如何更快的查询和加入一条记录? 求助! 帮帮忙呀!!关于统计的查询! 将两台机子的库里的数据合并的问题 SQL Server更新两台局域网中不同的数据 用企业管理器会造成数据库日志出现大量的账户登陆失败审核,怎么解决? mssql 能和 mysql 进行同步吗?如何实现?先谢各位了! 求一个简单的SQL SQL企业版的数据库个人版打不开?
left join sf b on a.sf=b.id
(select count(city),sf from city group by sf)b
where a.sf=b.sf