select a1,sum(a2) as groupTotal from table where a3='2005-02-14' group by a1 with rollup
解决方案 »
- rac两个小机oracle10G+hpun,重建了重做日志文件恢复
- 求一个存储过程的写法!
- 如何写sql脚本,导入excel表格的数据,excel表格里面一列内容超过4000字符。
- oracle中如何过滤&
- 请问哪里有Oracle10.2.0.1的补丁下载?
- sos!数据库启动时报ORA-00600[733]的错误怎么处理!在线等……
- win2003+oracle10g,安装到一半的时候,提示“oraclient.dll”找不到,但是我看见在安装目录的BIN文件夹下面是有的阿!怎么回事?
- 请教高手,有关数据导入导出的问题?
- 求助:Oracle8.05 for NT安装报错!
- JSP联接oracle8.17的问题
- 一个很简单的问题!
- 错误(ERROR - ORA-12154: TNS:could not resolve the connect identifier specified)
但不是很方便!
select a1,a2,
(select sum(a2) from (select a1,sum(a2) a2,a3 from table group by a1,a3)
where a3 ='2005-02-14') total
from (select a1,sum(a2) a2,a3 from table group by a1,a3)
where a3 ='2005-02-14';
b 3/(7+3)= 0.3可以这样写:select a1,ratio_to_report(sum(a2)) over() rate from table where a3='2005-02-14' group by a1