sql 新手 高手请看 Select Count(*) as Rec From Table1 Where P In (Select Max(P) as P From Table1 Group By S)Group By P没测试过~~~~~~~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select max(a)from (select count(p) a from table1 where s=2 group by p)没有测试 select top 1 p,min(s) as S,count(*) as Rec from table where s=2 group by p order by count(*) select s,max(a)from (select s,count(p) a from ps group by s,p) bsgroup by s测试通过!!~~~~~~~~~~~ 候选码跟码有什么区别? 多用户同时使用一个登录名,一个应用程序角色,可以吗? 在查询时如何为结果自动添加一个新字段,新字段的值全部是固定的字符串 这个sql求和语句怎么写 求一条sql求和语句 关于SQLSERVER的锁问题,多谢 被一个SQL语句搞得我快爆了,特来求教 100分,sqlserver 2005 ,如何用自定义函数 实现 返回表的问题(动态条件)! 100分重开一贴 如何实现查询一个表中第10到20条记录? 在VFP中如何制作DLL动态链接库???? 连接的问题
from (select count(p) a from table1 where s=2 group by p)
没有测试
from (select s,count(p) a from ps group by s,p) bs
group by s测试通过!!~~~~~~~~~~~