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.

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.


相关考题:

EMPLOYEES中职员编号为90的职员的commission_pct为空值,salary为1000,语句select12*salary*(commission_pct+0.2)comm from EMPLOYEES;comm显示的结果是()。 A.12000B.0C.2400D.NULL

在执行语句SELECT department_id FROM employees,departments WHERE employees.department_id= departments.department_id;时报错,原因是()。 A.没有给表employees和表departments加别名B.没有给列department_id加别名C.不能用employees.department_id=departments.department_id作为条件D.SELECT后面的department_id没有指定是哪个表

Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;C. SELECT dept_id, job_cat, MAX(salary) FROM employees;D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

Examine the data in the EMPLOYEES table:Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

Examine the data in the EMPLOYEES table:LAST_NAME DEPARTMENT_ID SALARYGetz 10 3000Davis 20 1500Bill 20 2200Davis 30 5000...Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? () A.SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C.SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E.SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

以“成绩”表为数据源,按“课程编号”字段统计每门课程最高分的SQL语句是()。A.SELECT 课程编号,MAX(成绩)AS 最高分 FROM 成绩B.SELECT 课程编号,MAX(成绩)AS 最高分 FROM 成绩 ORDER BY 课程编号C.SELECT 课程编号,成绩 FROM 成绩 WHERE 成绩>ANYD.SELECT 课程编号,MAX(成绩)AS 最高分 FROM 成绩 GROUP BY 课程编号

下列的预编译SQL语句,哪一个是正确的?A.select * from ?B.select ?,?,? from empC.select * from emp where eno=? salary>?D.select * from emp where ename=? and dept=?

有这样一个数据表,职工(职工号,姓名,职务,工资),要想查询工资最高的职工号和姓名,以下SELECT语句正确的是()A.SELECT职工号, 姓名FROM职工 WHERE工资= MAX(工资)B.SELECT职工号, 姓名FROM职工 WHERE工资=(SELECT MAX(工资) FROM职工)C.SELECT职工号, 姓名, 工资FROM职工 WHERE工资=MAX(工资)D.SELECT职工号, 姓名,MAX(工资) FROM职工WHERE工资=MAX(工资)

有这样一个数据表,职工表(职工号,姓名,职务,工资),要想查询工资最高的职工号和姓名,以下SELECT语句正确的是A.SELECT职工号, 姓名FROM职工 WHERE工资= MAX(工资)  B.SELECT职工号, 姓名FROM职工 WHERE工资=(SELECT MAX(工资) FROM职工)C.SELECT职工号, 姓名, 工资FROM职工 WHERE工资=MAX(工资)D.SELECT职工号, 姓名,MAX(工资) FROM职工WHERE工资=MAX(工资)