🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Filtering and Sorting: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Which finds names that START with "R"?
  2. Q2. What does WHERE deptid = NULL return?
  3. Q3. salary BETWEEN 40000 AND 60000 includes a salary of 60000?
  4. Q4. Which removes duplicate values from the result?
  5. Q5. In WHERE city = 'Pune' OR city = 'Delhi' AND salary 50000, which is evaluated first?
  6. Q6. Using the company employees table, how many rows does WHERE name LIKE 'e%' return?
  7. Q7. How many rows does SELECT name FROM employees WHERE deptid < 10 return for the company table?
  8. Q8. What does COALESCE(deptid, 0) give for an employee whose deptid is NULL?
  9. Q9. With the CASE in this lesson (= 80000 Senior, = 50000 Mid, else Junior), what band does a salary of exactly 50000 get?
  10. Q10. What does ORDER BY salary DESC, name ASC do when two employees have the same salary?