早教吧作业答案频道 -->其他-->
Oracle数据库中查询高于自己部门平均工资的员工信息已经有selecta.*fromempawheresal>(selectavg(sal)fromempwheredeptno=a.deptnoand)and后面是应该加groupbydeptno不然应该加什么呀?
题目详情
Oracle数据库中 查询高于自己部门平均工资的员工信息
已经有 select a.* from emp a where sal >(select avg(sal) from emp where deptno=a.deptno and__)
and后面是应该加group by deptno
不然应该加什么呀?
已经有 select a.* from emp a where sal >(select avg(sal) from emp where deptno=a.deptno and__)
and后面是应该加group by deptno
不然应该加什么呀?
▼优质解答
答案和解析
select b.* from (
select deptno,avg(sal) as avgsal from emp where deptno='部门名称' group by deptno
) a,emp b
where b.sal>a.sal and a.deptno=b.deptno
试试这个
select deptno,avg(sal) as avgsal from emp where deptno='部门名称' group by deptno
) a,emp b
where b.sal>a.sal and a.deptno=b.deptno
试试这个
看了 Oracle数据库中查询高于...的网友还看了以下:
感应电动势的应用E=n△φ/△t是感生电动势的公式,因为B的变化才出现了感应电动势,为什么不写成E= 2020-03-30 …
关于白噪声covariance的计算已知w(t)=-w(t-1)+e(t),e(t)~(0,1)求 2020-05-13 …
关于随机过程的平均功率问题随机过程书上已经知道E(X(t)^2)对时间求平均是平均功率,如果是平稳 2020-05-23 …
刚做到一道数学题不懂来问问!e的8次方等于未知数T,求e的T次方等与多少?[e=2.713.]好像 2020-06-02 …
∮1dx/(x^2+y^2+z^2)ds,其中,曲线x=(e^t)sinty==(e^t)cost 2020-06-03 …
已知:在三角形ABC中,角C=90度,CM垂直AB于M,AT平分角BAC交CM于D,交BC于T,过 2020-07-17 …
已知向量ā≠ē,|ē|=1,对任意t∈R,恒有|ā-tē|≥|ā-ē|,则ā与ē的关系两边平方并整 2020-08-01 …
高斯过程求期望如果X1(t),X2(t),X3(t),X4(t)都是高斯随机过程那么E[X1(t)X 2020-10-31 …
考场求题…急…已知描述某LTI系统的微分方程如下.y''(t)+7y'(t)+10y(t)=2f'( 2020-11-21 …
编译原理的两个题~~非常感谢~~~已知文法G[E]:EàET+|T,TàTF*|F,FàFP-|P, 2020-11-23 …