nerdexam
Oracle

1Z0-007 · Question #139

Examine the description of the EMPLOYEES table: Which statement shows the maximum salary paid in each job category of each department?

The correct answer is B. SELECT dept_id, job_cat, MAX(salary). This answer provides correct syntax and semantics to show the maximum salary paid in each job category of each department. Incorrect Answers A: This query will not return any row because condition SALARY > MAX(SALARY) is FALSE. C: This query will return error because you cannot…

Using Functions (Single-Row, Group, Conversion, Conditional)

Question

Examine the description of the EMPLOYEES table:

Which statement shows the maximum salary paid in each job category of each department?

Exhibit

1Z0-007 question #139 exhibit

Options

  • ASELECT dept_id, job_cat, MAX(salary)
  • BSELECT dept_id, job_cat, MAX(salary)
  • CSELECT dept_id, job_cat, MAX(salary)
  • DSELECT dept_id, job_cat, MAX(salary)
  • ESELECT dept_id, job_cat, MAX(salary)

How the community answered

(47 responses)
  • A
    6% (3)
  • B
    74% (35)
  • C
    4% (2)
  • D
    2% (1)
  • E
    13% (6)

Explanation

This answer provides correct syntax and semantics to show the maximum salary paid in each job category of each department. Incorrect Answers A: This query will not return any row because condition SALARY > MAX(SALARY) is FALSE. C: This query will return error because you cannot show maximum salary with DEPT_ID and JOB_CAT without grouping by these columns. D: The GROUP BY clause is missing JOB_ID column. E: You don't need to group results of query by SALARY in the GROUP BY column.

Topics

#GROUP BY#MAX function#multi-column grouping#aggregate functions

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice