QuestionQ178

VerifiedRestricting and sorting data

Review the contents of the EMP table:

Question Image

Review this query, which executes successfully:

Question Image

What is the result?

Explanation

ORDER BY salary sorts salaries in ascending order by default. FETCH FIRST 5 ROWS WITH TIES returns the first five sorted rows and would include extra rows only if they tied with the fifth row’s sort value. The fifth salary is 24000 and is unique, so exactly the five lowest-paid employees are returned in ascending salary order.

Learn more

Community Discussion

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