单选题In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()A Immediately after the SELECT clauseB Before the WHERE clauseC Before the FROM clauseD After the ORDER BY clauseE After the WHERE clause

题目
单选题
In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()
A

Immediately after the SELECT clause

B

Before the WHERE clause

C

Before the FROM clause

D

After the ORDER BY clause

E

After the WHERE clause

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()

A. remove the ORDER BY clause

B. remove the table alias prefix from the WHERE clause

C. remove the table alias from the SELECT clause

D. prefix the column in the USING clause with the table alias

E. prefix the column in the ORDER BY clause with the table alias

F. replace the condition "d.department_id NOT IN (10,40)" in the WHERE clause with "d.department_id <> 10 AND d.department_id <> 40"


参考答案:C

第2题:

Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater then 5000? ()

A. ORDER BY SALARY > 5000

B. GROUP BY SALARY > 5000

C. HAVING SALARY > 5000

D. WHERE SALARY > 5000


参考答案:D

第3题:

标准SQL基本查询模块的结构是A)SELECT…FROM…ORDER BYB)SELECT…WHERE…GROUP BYC)SELECT…WHERE…HAVINGD)SELECT…FROM…WHERE


正确答案:D
使用SQL进行查询的基本查询模块结构是:
SELECT<字段名> FROM<数据表名> WHERE<查询条件>,
故选项D为正确答案。

第4题:

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

第5题:

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

第6题:

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

第7题:

In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement? ()

A. Immediately after the SELECT clause

B. Before the WHERE clause

C. Before the FROM clause

D. After the ORDER BY clause

E. After the WHERE clause


参考答案:E

第8题:

对由SELECT—FROM—WHERE—GROUP—ORDER组成的SQL语句,其在被DBMS处理时,各子句的执序次序(43)。

A.SELECT—FROM—GROUP—WHERE—ORDER

B.FROM—SELECT—WHERE—GROUP—ORDER

C.FROM—WHERE—GROUP—SELECT—ORDER

D.SELECT—FROM—WHERE—GROUP—ORDER


正确答案:C
解析:SELECT[ALL|DISTNCT]目标列表达式>[目标列表达式>]…FROM表名或视图名>[表名或视图名>]...[WHERE条件表达式>][GROUPBY列名1>[HAVING条件表达式>]][ORDERBY列名2>[ASC|DESC]];整个SBLECT语句的含义是:根据WHERE子句的条件表达式,从FROM子句指定的基本表或视图中找出满足条件的元组,再按SELECTT子句中的目标列表达式,选出元组中的属性值形成结果表,如果有GROUP子句,则将结果按列名1>的值进行分组,该属性列值相等的元组为一个组。通常会在每组中作用集函数。如果GROUP子句带HAVING短语,则只有满足指定条件的组才予抽出;如果有ORDER子句,则结果表还要按列名2>的值的升序或降序排序。

第9题:

Examine the description of the MARKS table:SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects.Examine this SELECT statement based on the MARKS table:What is the result of the SELECT statement?()

A. The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.

B. The statement returns an error at the SELECT clause.

C. The statement returns an error at the WHERE clause.

D. The statement returns an error at the ORDER BY clause.


参考答案:C

第10题:

对由SELECT--FROM—WHERE—GROUP--ORDER组成的SQL语句,其在被DBMS处理时,各子句的执行次序为()

A.SELECT—FROM—GROUP—WHERE—ORDER

B.FROM——SELECT--WHERE——GROUP——ORDER

C.FROM——WHERE——GROUP——SELECT——ORDER

D.SELECT——FROM——WHERE——GROUP——ORDER


答案:C

更多相关问题