QuestionQ117

VerifiedUsing Subqueries to Solve Queries

You need to determine the number of employees whose salary is less than that of employee 110.

Which statement does not accomplish this?

Explanation

A scalar subquery must return at most one row. In choice A, the predicate e.employee_id = 110 refers to the outer query row rather than the subquery's a rows. When the outer row is employee 110, the subquery returns every employee salary instead of employee 110's single salary, so the statement fails.

Community Discussion

No comments yet. Be the first to start the discussion!