有一个帐户scott/tiger里面有emp和dept两个表小弟求解一道题:
显示部门工资总和高于雇员工资总和1/3的部门名称及工资总和!~~求高手指点~应该怎样写!!
显示部门工资总和高于雇员工资总和1/3的部门名称及工资总和!~~求高手指点~应该怎样写!!
解决方案 »
- sql语句问题,求解,在线等!
- ORA-03113: 通信通道的文件结束!
- 关于建表的问题
- 谁能给个oracle 9i for win2003(32 bit)的下载网址呢,多谢大家了!!!急用!!!
- violated - parent key not found错误
- 字符集的疑问?(sqlldr装入时出现乱码)
- 如何在一個select语句產生的結果的最前面添加一個空行??(用)sql實現
- 请问如何把一个表中的内容insert into到另外一个表中?
- delphi+oracle远程存取
- 创建临时表并向表中添加记录数据,出现错误ora-25153。
- 关于索引对查询排序的影响问题
- 重启服务器后, oracle 实例无法自动启动
from employee,dept
where employee.deptno = dept.deptno
group by deptname
having sum(salary)*3 > (select sum(salary) from employee)
刚重装系统了,还没有安装Oracle呢,试着写了
select deptname,sum(salary)
from employee a,dept b
where a.deptno = b.deptno
group by deptname
having sum(salary)*3 > (select sum(salary) from employee where deptno=a.deptno)