100. Which two statements are true regarding the GROUP BY clause in a SQL
statement? (Choose two.)
A. You can use column alias in the GROUP BY clause.
B. Using the WHERE clause after the GROUP BY clause excludes the rows after
creating groups.
C. The GROUP BY clause is mandatory if you are using an aggregate function
in the SELECT clause.
D. Using the WHERE clause before the GROUP BY clause excludes the rows before
creating groups.
E. If the SELECT clause has an aggregate function, then those individual
columns without an aggregate function in the SELECT clause should be included
in the GROUP BY clause.
Answer: DE
Mandatory:强制 aggregate:合计
Order by 才可以用别名,group by 不能用别名
对应C选项,只有求和以为的Select列名需要到group by里,如果没有就不需要
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11312660/viewspace-718870/
,如需转载,请注明出处,否则将追究法律责任。