查询部门20的员工数量,每个月的工资总和及平均工资( ) A: SELECT sum(nvl(sal,0)),avg(nvl(sal,0)) from emp B: SELECT ename,sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno C: SELECT ename,count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno D: SELECT count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno
查询部门20的员工数量,每个月的工资总和及平均工资( ) A: SELECT sum(nvl(sal,0)),avg(nvl(sal,0)) from emp B: SELECT ename,sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno C: SELECT ename,count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno D: SELECT count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno
下面哪个函数能计算平均值 A: sum() B: avg() C: count(0 D: max()
下面哪个函数能计算平均值 A: sum() B: avg() C: count(0 D: max()
以下语句错误的是() A: LECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; B: SELECT rank, AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000 C: SELECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; D: SELECT AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000; E: SELECT rank, AVG(salary) FROM people GROUP BY rank WHERE AVG(salary) > 1000;
以下语句错误的是() A: LECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; B: SELECT rank, AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000 C: SELECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; D: SELECT AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000; E: SELECT rank, AVG(salary) FROM people GROUP BY rank WHERE AVG(salary) > 1000;
按照课程号进行分组,统计学生平均成绩大于60分的学生的信息( ) A: select cid,avg(grade) from sc group by cid having avg(grade)>60 B: select cid,avg(grade) from student group by cid having avg(grade)>60 C: select cid,avg(grade) from course where avg(grade)>60 group by cid D: select cid,avg(grade) from student where avg(grade)>60 group by cid
按照课程号进行分组,统计学生平均成绩大于60分的学生的信息( ) A: select cid,avg(grade) from sc group by cid having avg(grade)>60 B: select cid,avg(grade) from student group by cid having avg(grade)>60 C: select cid,avg(grade) from course where avg(grade)>60 group by cid D: select cid,avg(grade) from student where avg(grade)>60 group by cid
下面哪个语句关于GROUP BY 和HAVING语句的使用是正确的?() A: A.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_IDHAVING AVG(SALARY) > 3000; B: B.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_ID ,DEPARTMENT_IDHAVING AVG(SALARY) > 3000; C: C.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY AVG(SALARY)HAVING AVG(SALARY) > 3000; D: D.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_ID , DEPARTMENT_IDHAVING SALARY > 3000;
下面哪个语句关于GROUP BY 和HAVING语句的使用是正确的?() A: A.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_IDHAVING AVG(SALARY) > 3000; B: B.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_ID ,DEPARTMENT_IDHAVING AVG(SALARY) > 3000; C: C.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY AVG(SALARY)HAVING AVG(SALARY) > 3000; D: D.SELECT JOB_ID , DEPARTMENT_ID , AVG(SALARY)FROM EMPLOYEES GROUP BY JOB_ID , DEPARTMENT_IDHAVING SALARY > 3000;
按照学号进行分组,统计学生的平均成绩,且平均分按降序排列 A: select sid, avg(grade) from sc group by sid order by avg(grade) desc B: select sid, avg(grade) from sc group by cid order by avg(grade) desc C: select sid, avg(grade) from student group by sid order by avg(grade) desc D: select sid, avg(grade) from student group by cid order by avg(grade)
按照学号进行分组,统计学生的平均成绩,且平均分按降序排列 A: select sid, avg(grade) from sc group by sid order by avg(grade) desc B: select sid, avg(grade) from sc group by cid order by avg(grade) desc C: select sid, avg(grade) from student group by sid order by avg(grade) desc D: select sid, avg(grade) from student group by cid order by avg(grade)
关系SC(Sno,Cno,Grade)表示学号,课程号,成绩。现要查询平均分在90分以上的学生的学号和平均成绩,正确的语句是______。 A: SELECT Sno,AVG(Grad FROM SC WHERE AVG(Grad>=90 GROUP BY Sno B: SELECT Sno,AVG(Grad FROM SC GROUP BY Sno HAVING AVG(Grad>=90 C: SELECT Sno,AVG(Grad FROM SC WHERE AVG(Grad>=90 ORDER BY Sno D: SELECT Sno,AVG(Grad FROM SC GROUP BY Cno HAVING AVG(Grad>=90
关系SC(Sno,Cno,Grade)表示学号,课程号,成绩。现要查询平均分在90分以上的学生的学号和平均成绩,正确的语句是______。 A: SELECT Sno,AVG(Grad FROM SC WHERE AVG(Grad>=90 GROUP BY Sno B: SELECT Sno,AVG(Grad FROM SC GROUP BY Sno HAVING AVG(Grad>=90 C: SELECT Sno,AVG(Grad FROM SC WHERE AVG(Grad>=90 ORDER BY Sno D: SELECT Sno,AVG(Grad FROM SC GROUP BY Cno HAVING AVG(Grad>=90
A.SELECT Cno, AVG(Score) FROM SCS GROUP BY Score ORDER BY 2, Cno Desc B.SELECT Cno, AVG(Score) FROM SCS GROUP BY Cno ORDER BY 2, Cno Desc C.SELECT Cno, AVG(Score) FROM SCS WHERE Cno, Desc GROUP BY Score D.SELECT Cno, AVG(Score) FROM SCS GROUP BY, AVG(Score) ORDER BY, Cno Desc
A.SELECT Cno, AVG(Score) FROM SCS GROUP BY Score ORDER BY 2, Cno Desc B.SELECT Cno, AVG(Score) FROM SCS GROUP BY Cno ORDER BY 2, Cno Desc C.SELECT Cno, AVG(Score) FROM SCS WHERE Cno, Desc GROUP BY Score D.SELECT Cno, AVG(Score) FROM SCS GROUP BY, AVG(Score) ORDER BY, Cno Desc
命令Select S_No,Avg(Grade)As ‘平均成绩’ From Score Group By S_No Having Avg(Grade)>=85,表示
命令Select S_No,Avg(Grade)As ‘平均成绩’ From Score Group By S_No Having Avg(Grade)>=85,表示
avg功能是求整形数组中的前若干个元素的平均值,设数组元素个数最多不超过10,则下列函数说明语句错误的是______。 A: int avg(int*a, int n); B: int avg(int a[10], int n); C: int avg(int a, int n); D: int avg(int a[], int n);
avg功能是求整形数组中的前若干个元素的平均值,设数组元素个数最多不超过10,则下列函数说明语句错误的是______。 A: int avg(int*a, int n); B: int avg(int a[10], int n); C: int avg(int a, int n); D: int avg(int a[], int n);