单选题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 > 5000B GROUP BY SALARY > 5000C HAVING SALARY > 5000D WHERE SALARY > 5000

题目
单选题
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


相似考题
更多“单选题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 5000B GROUP BY SALARY 5000C HAVING SALARY 5000D WHERE SALARY 5000”相关问题
  • 第1题:

    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));


    参考答案:C, D, E

  • 第2题:

    SELECT语句中使用()子句来显示工资超过5000的员工。

    • A、ORDER BY SALARY>5000
    • B、GROUP BY SALARY>5000
    • C、HAVING SALARY>5000
    • D、WHERE SALARY>5000

    正确答案:D

  • 第3题:

    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

  • 第4题:

    Examine the structures of the EMPLOYEES and TAX tables. EMPLOYEES EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER References MGR_ID NUMBER EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT _ID column of the DEPARTMENT table TAX MIN_SALARY NUMBER MAX_SALARY NUMBER TAX_PERCENT NUMBER Percentage tax for given salary range You need to find the percentage tax applicable for each employee. Which SQL statement would you use?()

    • A、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary BETWEEN t.min _ salary AND t.max_salary
    • B、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary > t.min_salary, tax_percent
    • C、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE MIN(e.salary) = t.min_salary AND MAX(e.salary) = t.max_salary
    • D、You cannot find the information because there is no common column between the two tables.

    正确答案:A

  • 第5题:

    Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?()

    • A、SELECT ename, salary*12 'Annual Salary' FROM employees;
    • B、SELECT ename, salary*12 "Annual Salary" FROM employees;
    • C、SELECT ename, salary*12 AS Annual Salary FROM employees;
    • D、SELECT ename, salary*12 AS INITCAP("ANNUAL SALARY") FROM employees

    正确答案:B

  • 第6题:

    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_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;

    正确答案:B

  • 第7题:

    Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 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));

    正确答案:C,D,E

  • 第8题:

    单选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view?()
    A

    SELECT a.last_name, a.salary, a.department_id,

    B

    maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;

    C

    SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))

    D

    SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);

    E

    SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; 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.


    正确答案: B
    解析: 暂无解析

  • 第10题:

    多选题
    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));


    正确答案: E,C
    解析: 暂无解析

  • 第11题:

    单选题
    Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?()
    A

    SELECT ename, salary*12 'Annual Salary' FROM employees;

    B

    SELECT ename, salary*12 Annual Salary FROM employees;

    C

    SELECT ename, salary*12 AS Annual Salary FROM employees;

    D

    SELECT ename, salary*12 AS INITCAP(ANNUAL SALARY) FROM employees


    正确答案: A
    解析: 暂无解析

  • 第12题:

    单选题
    下面哪条语句可以取出薪水最高的前三个人:()
    A

    SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY );

    B

    SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY ) WHERE ROWNUM<=3;

    C

    SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY DESC) WHERE ROWNUM<=3;

    D

    SELECT * FROM EMPLOYEES WHERE ROWNUM<=3 ORDER BY SALARY DESC;


    正确答案: C
    解析: 暂无解析

  • 第13题:

    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

  • 第14题:

    下面哪条语句可以取出薪水最高的前三个人:()

    • A、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY );
    • B、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY ) WHERE ROWNUM<=3;
    • C、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY DESC) WHERE ROWNUM<=3;
    • D、SELECT * FROM EMPLOYEES WHERE ROWNUM<=3 ORDER BY SALARY DESC;

    正确答案:C

  • 第15题:

    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()

    • A、SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;
    • B、SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
    • C、SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;
    • D、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)
    • E、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;

    正确答案:D

  • 第16题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()

    • A、SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;
    • B、SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))
    • C、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);
    • D、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);

    正确答案:A

  • 第17题:

    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));

    正确答案:C,D,E

  • 第18题:

    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; 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

  • 第19题:

    单选题
    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; 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.


    正确答案: B
    解析: 暂无解析

  • 第20题:

    多选题
    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));


    正确答案: D,E
    解析: 暂无解析

  • 第21题:

    单选题
    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()
    A

    SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;

    B

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;

    C

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;

    D

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)

    E

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP 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.


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    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
    解析: 暂无解析

  • 第24题:

    多选题
    Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 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));


    正确答案: D,B
    解析: 暂无解析