怎样在结果集中查询需要的数据 select count(*) as cn from (select t1.B,t2.D from t1,t2 where t1.b=t2.b) as A group by D 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select t2.D,count(t1.B) from t1,t2 where t1.B=t2.B group by t1.D select t2.D, count(t1.B) from t1inner join t2 on t1.B=t2.B group by t2.D select t2.D,count(t1.B) from t1,t2 where t1.B=t2.B group by t2.D select t1.B,t2.D where t1.b=t2.b group by t2.d select count(M.*) from(select t1.B,t2.D from t1,t2 where t1.b=t2.b) as M group by M.D 加个group by t2.d不就可以了,不明白楼主为什么要“select count(*) ”如果要得到没组的条数:select t1.B,t2.D,count(t1.b) where t1.b=t2.b group by t2.d 加个group by t2.d不就可以了如果要得到分组条数:select t1.B,t2.D,count(t1.b) where t1.b=t2.b group by t2.d 求解 dword byte 复制表结构及记录 这样的select语句应该怎么写? 查询一个数据库下所有表的数据??急,在线等! 一个联合查询问题 关于日期型索引 SQL的安装问题! 为什么不能登陆到oracle management server? 关于MS SQL Server的字符字段的空格问题 查询问题 求一SQL语句的写法,不难,谢谢帮忙.
t2.D,
count(t1.B)
from
t1
inner join
t2
on
t1.B=t2.B
group by
t2.D
不就可以了,不明白楼主为什么要“select count(*) ”如果要得到没组的条数:
select t1.B,t2.D,count(t1.b) where t1.b=t2.b group by t2.d