请pengdali 、playyuer(双规干部)等进! select type,count(*) 总次数,sum(维修次数) 维修次数 from (select *,(select count(*) from t2 where 5>time and time>2 and no=t2.no) 维修次数 from t3) tem group by type 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * ,(select count(*) from t2 where no in (select no from T3 where T3.type = t1.type)) from t1 select * ,(select count(*) from t2 where no in (select no from T3 where T3.type = t1.type)) as afrom t1where a ..... select * ,(select count(*) from t2 where no in (select no from T3 where type = t1.type)) as afrom t1where a ..... select t3.type,count(*) as 维修次数 from t2,t3where t2.no=t3.nogroup by t3.typeunion allselect 'All' as type,count(*) as 维修次数 from t2 小干部,加我msn:[email protected],好几次联系你找不到 SQL3表联合查询的问题 有请石头,青峰看看这个问题,是PB的和SQL无关. 哎,现在的图书质量很差 大家帮我看看这存储过程有我们问题?谢谢了 求救,存储过程分页!测试未通过。。 求SQL语句,最好一句搞定,有点小麻烦 如何用SQL語句表達? 数据库回滚问题 客户端连接服务器,经过路由器的连接语句怎么写(急,急,急!!!) 绝对菜鸟问题! 各位大侠救命呀!!!!UPDATE巨难问题 如何获得增量数据??
,(select count(*)
from t2
where no in (select no
from T3
where T3.type = t1.type))
from t1
,(select count(*)
from t2
where no in (select no
from T3
where T3.type = t1.type)) as a
from t1
where a .....
,(select count(*)
from t2
where no in (select no
from T3
where type = t1.type)) as a
from t1
where a .....
from t2,t3
where t2.no=t3.no
group by t3.type
union all
select 'All' as type,count(*) as 维修次数
from t2