表中有字段 区域,子区域,完成,未完成 字段
现在要查询每个子区域下完成总数,未完成总数,完成率 这个语句该怎么写
拙计了,求大神支招
在线等
现在要查询每个子区域下完成总数,未完成总数,完成率 这个语句该怎么写
拙计了,求大神支招
在线等
解决方案 »
- 如何使Oracle查询语句更效率?
- Oracle SQL Developer 1.0 如何只显示用户表?
- 如何终止正在运行的存储过程
- 无法创建JOB问题!请教大家!!!急急!!!!
- 急!!我在 oracle9i 中创建用户和表时遇到了问题!
- xp安装oracle8报错javaw.exe,要怎么解决?
- 请教各位朋友。谢谢.
- asp调用oracle存储过程时的recordset问题
- 高手,用sql语句如何找出表中某字段相同的前5条记录
- 怎样在oracle中的存储过程中动态创建一个新表
- 控制文件的HeartBeat在哪可以找到?
- 【大神。求指教】SQL语句,在所有数据插入完成之后,插入新的一列,再往新的列里插入数据怎么办?
select region,subregion,count(select * from comm_host_tbl where done='Y'),count(select * from comm_host_tbl where undone='Y') from comm_host_tbl group by region,subregion以上是我写的语句
select region,
subregion,
sum(decode(done,'Y',1,0)),
sum(decode(undone,'Y',1,0)),
sum(decode(done,'Y',1,0))/((sum(decode(undone,'Y',1,0))/ sum(decode(done,'Y',1,0)))
from comm_host_tbl
group by region, subregion
sum(decode(done,'Y',1,0))/(sum(decode(undone,'Y',1,0))+ sum(decode(done,'Y',1,0)))+笔误