############高分----sql语句------################ 你是用什么鉴定方法,什么值为“胜”可以用decode函数吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select fclass,count(*),sum(case fresult when '胜' then 1 else 0 end) from table group by fclass select fclass,count(fclass),(select count(*) from table where fclass=a.fclass and fresult='胜') from table a group by fclass select count(*),count(decode(fresult,'胜',1,null))from table select fclass,count(*),count(decode(fresult,'胜',1))from tablenamegroup by fclass sasacat(傻傻猫)的好,也可以用decodeselect fclass,count(*),sum(decode(fresult,'胜',1,0))from table group by fclass select count(*),count(decode(fresult,'胜',1,null))from tablegroup by fclass select fclass , (select count(*) from table ), (select count(*) from table where fresult='胜')from table Decode的方法经实践是可用的!水清兄的子查讯方法在9i表中是可用的,在视图或在8i不可行,傻傻猫兄的case方法不能写在8i中,在9i中也是可行的!谢谢! 一个推荐表里面 怎么查询第一个推荐人下面所有的成员 包括成员所推荐的人 Oracle中按日期展开获取数据 AIX下ORACLE启动和关闭!!!!急急急!!!!!! 如何查询某张表是否被做视图 请高手指点下SQL 登陆问题 求sql 求一比较麻烦的sql asp 连接oracle 的时候出现了问题 询求SQL语句:如何得到数据库中所有的方案名(Schemas),以及该方案所属的所有表名? ORACLE和SQL SERVER的性能问题 sql server里charindex函数的oracle替代?
from table
group by fclass
where fclass=a.fclass and fresult='胜') from table a group by fclass
from table
from tablename
group by fclass
select fclass,count(*),sum(decode(fresult,'胜',1,0))
from table
group by fclass
from table
group by fclass
(select count(*) from table ),
(select count(*) from table where fresult='胜')
from table
谢谢!