多选题Which two are true about aggregate functions?()AYou can use aggregate functions in any clause of a SELECT statement.BYou can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statement.CYou can mix

题目
多选题
Which two are true about aggregate functions?()
A

You can use aggregate functions in any clause of a SELECT statement.

B

You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statement.

C

You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.

D

You can pass column names, expressions, constants, or functions as parameter to an aggregate function.

E

You can use aggregate functions on a table, only by grouping the whole table as one single group.

F

You cannot group the rows of a table by more than one column while using aggregate functions.

参考答案和解析
正确答案: D,C
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

The EMP table contains these columns:You need to display the employees who have not been assigned to any department.You write the SELECT statement:What is true about this SQL statement?()

A. The SQL statement displays the desired results.

B. The column in the WHERE clause should be changed to display the desired results.

C. The operator in the WHERE clause should be changed to display the desired results.

D. The WHERE clause should be changed to use an outer join to display the desired results.


参考答案:C

第2题:

Which two statements are true about WHERE and HAVING clauses? ()

  • A、A WHERE clause can be used to restrict both rows and groups.
  • B、A WHERE clause can be used to restrict rows only.
  • C、A HAVING clause can be used to restrict both rows and groups.
  • D、A HAVING clause can be used to restrict groups only.
  • E、A WHERE clause CANNOT be used in a query of the query uses a HAVING clause.
  • F、A HAVING clause CANNOT be used in subqueries.

正确答案:B,D

第3题:

In which four clauses can a subquery be used? ()

A. in the INTO clause of an INSERT statement

B. in the FROM clause of a SELECT statement

C. in the GROUP BY clause of a SELECT statement

D. in the WHERE clause of a SELECT statement

E. in the SET clause of an UPDATE statement

F. in the VALUES clause of an INSERT statement


参考答案:B, D, E, F

第4题:

In which four clauses can a subquery be used? ()

  • A、in the INTO clause of an INSERT statement
  • B、in the FROM clause of a SELECT statement
  • C、in the GROUP BY clause of a SELECT statement
  • D、in the WHERE clause of a SELECT statement
  • E、in the SET clause of an UPDATE statement
  • F、in the VALUES clause of an INSERT statement

正确答案:B,D,E,F

第5题:

Which two are true about aggregate functions? ()

  • A、You can use aggregate functions in any clause of a SELECT statement.
  • B、You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statement.
  • C、You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.
  • D、You can pass column names, expressions, constants, or functions as parameter to an aggregate function.
  • E、You can use aggregate functions on a table, only by grouping the whole table as one single group.
  • F、You cannot group the rows of a table by more than one column while using aggregate functions.

正确答案:A,D

第6题:

Click the Exhibit button and examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP BY department_id);Which statement is true?()

A.The SELECT statement is syntactically accurate.

B.The SELECT statement does not work because there is no HAVING clause.

C.The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

D.The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


参考答案:A

第7题:

Which two statements about subqueries are true? ()

  • A、A subquery should retrieve only one row.
  • B、A subquery can retrieve zero or more rows.
  • C、A subquery can be used only in SQL query statements.
  • D、Subqueries CANNOT be nested by more than two levels.
  • E、A subquery CANNOT be used in an SQL query statement that uses group functions.
  • F、When a subquery is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the subquery should contain only one column.

正确答案:B,F

第8题:

Exhibit:Examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP BY department_id);Which statement is true?()

A. The SELECT statement is syntactically accurate.

B. The SELECT statement does not work because there is no HAVING clause.

C. The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

D. The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


参考答案:A

第9题:

Which two statements are true regarding the ORDER BY clause? ()

  • A、It is executed first in the query execution 
  • B、It must be the last clause in the SELECT statement 
  • C、It cannot be used in a SELECT statement containing a HAVING clause
  • D、You cannot specify a column name followed by an expression in this clause 
  • E、You can specify a combination of numeric positions and column names in this clause

正确答案:B,E

第10题:

Which two statements are true regarding subqueries? ()

  • A、A subquery can retrieve zero or more rows 
  • B、Only two subqueries can be placed atone level 
  • C、A subquery can be used only in SQL query statements 
  • D、A subquery can appear on either side of a comparison operator 
  • E、There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement 

正确答案:A,D

更多相关问题