以下语句错误的是() 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
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);
查询book表中每类图书的平均单价,结果只显示平均单价大于30的图书类别名和平均单价,以下SQL语句正确的是? A: select 图书类别,avg(单价)from bookwhere 单价 >= avg(单价); B: select 图书类别,avg(单价)from bookgroup by 图书类别; C: select 图书类别,avg(单价)from bookgroup by 图书类别having avg(单价) > 30; D: select 图书类别,avg(单价)from bookgroup by 图书类别where avg(单价) > 30;
查询book表中每类图书的平均单价,结果只显示平均单价大于30的图书类别名和平均单价,以下SQL语句正确的是? A: select 图书类别,avg(单价)from bookwhere 单价 >= avg(单价); B: select 图书类别,avg(单价)from bookgroup by 图书类别; C: select 图书类别,avg(单价)from bookgroup by 图书类别having avg(单价) > 30; D: select 图书类别,avg(单价)from bookgroup by 图书类别where avg(单价) > 30;
下面哪个语句关于GROUP BY 和HAVING语句的使用是正确的是?() A: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY JOB_ID<br/>HAVING AVG(SALARY) > 3000; B: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY JOB_ID,<br/>DEPARTMENT_ID HAVING AVG(SALARY) > 3000; C: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY<br/>AVG(SALARY) HAVING AVG(SALARY) > 3000; D: FROM<br/>EMPLOYEES GROUP BY JOB_ID, DEPARTMENT_ID HAVING SALARY > 3000;
下面哪个语句关于GROUP BY 和HAVING语句的使用是正确的是?() A: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY JOB_ID<br/>HAVING AVG(SALARY) > 3000; B: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY JOB_ID,<br/>DEPARTMENT_ID HAVING AVG(SALARY) > 3000; C: SELECT<br/>JOB_ID, DEPARTMENT_ID, AVG(SALARY) FROM EMPLOYEES GROUP BY<br/>AVG(SALARY) HAVING AVG(SALARY) > 3000; D: FROM<br/>EMPLOYEES GROUP BY JOB_ID, DEPARTMENT_ID HAVING SALARY > 3000;
【单选题】显示图书信息表中不同书架图书的平均价格大于50元的书架号和平均价格。能得到正确结果的SELECT语句是 A: select casename,AVG(price) <br> from bookinfo group by casename where AVG(price)>50 B: select casename,AVG(price)>50 from bookinfo group by casename C: select casename,AVG(price) <br> from bookinfo<br> having AVG(price)>50 group by casename D: select casename,AVG(price) <br> from bookinfo group by casename<br> having AVG(price)>50
【单选题】显示图书信息表中不同书架图书的平均价格大于50元的书架号和平均价格。能得到正确结果的SELECT语句是 A: select casename,AVG(price) <br> from bookinfo group by casename where AVG(price)>50 B: select casename,AVG(price)>50 from bookinfo group by casename C: select casename,AVG(price) <br> from bookinfo<br> having AVG(price)>50 group by casename D: select casename,AVG(price) <br> from bookinfo group by casename<br> having AVG(price)>50