nerdexam
Oracle

1Z0-007 · Question #136

Examine the data in the EMPLOYEES table: Which three subqueries work? (Choose three)

The correct answer is C. SELECT distinct department_id D. SELECT department_id E. SELECT last_name. These answers show correct syntax, because they use ANY and ALL keywords for convert multi- row output of sub-query to one-row result. Incorrect Answers A: This SELECT statement is incorrect because of multi-row return of sub-query: it will return minimal salary for EACH…

Displaying Data from Multiple Tables and Subqueries

Question

Examine the data in the EMPLOYEES table:

Which three subqueries work? (Choose three)

Exhibit

1Z0-007 question #136 exhibit

Options

  • ASELECT *
  • BSELECT *
  • CSELECT distinct department_id
  • DSELECT department_id
  • ESELECT last_name
  • FSELECT department_id

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    13% (6)
  • C
    79% (38)
  • F
    4% (2)

Explanation

These answers show correct syntax, because they use ANY and ALL keywords for convert multi- row output of sub-query to one-row result. Incorrect Answers A: This SELECT statement is incorrect because of multi-row return of sub-query: it will return minimal salary for EACH department. B: This SELECT statement is incorrect because of multi-row return of sub-query: it will return average salary for EACH department. F: This SELECT statement is incorrect because GROUP BY clause cannot contain functions, like AVG(), MIN(), MAX() and so on.

Topics

#subquery#IN operator#DISTINCT in subquery#WHERE clause subquery

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice