【单选题】显示图书信息表中不同书架图书的平均价格大于50元的书架号和平均价格。能得到正确结果的SELECT语句是
A: select casename,AVG(price)
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)
from bookinfo
having AVG(price)>50 group by casename
D: select casename,AVG(price)
from bookinfo group by casename
having AVG(price)>50
A: select casename,AVG(price)
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)
from bookinfo
having AVG(price)>50 group by casename
D: select casename,AVG(price)
from bookinfo group by casename
having AVG(price)>50
举一反三
- 【单选题】统计图书信息表中每个出版社图书的平均价格。能得到正确结果的SELECT语句是 A: A、select pubname,AVG(price) from bookinfo order by puname B: select pubname,AVG(price) from bookinfo group by pubname C: select pubname,price from bookinfo D: select pubname,AVG(price) from bookinfo
- 下面哪个语句关于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;
- 以下____完整,语句的作用是:查询book表中图书价格大于图书均价的图书信息select * from book where _____>;(select avg(price) from Book )
- 按照课程号进行分组,统计学生平均成绩大于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
- 以下语句错误的是() 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;