--:--









Quiz for Sorting with ORDER BY

Course: SQL | Subject: SQL | Topic: Data Query Language (DQL)



Logo

Q1: Which SQL keyword is used to sort the result set?

Logo

Q2: Which clause is used to sort the result set in SQL?

Logo

Q3: What is the default sorting order of ORDER BY?

Logo

Q4: How do you sort the result in descending order?

Logo

Q5: Which keyword is used to sort by multiple columns?

Logo

Q6: What happens if you use ORDER BY on a non-selected column?

Logo

Q7: Which of the following correctly sorts employees by salary and then by name?

Logo

Q8: Which clause is compatible with ORDER BY for filtering rows?

Logo

Q9: What is the result of: SELECT * FROM students ORDER BY age DESC;

Logo

Q10: How does SQL treat NULLs in ORDER BY?

Logo

Q11: Which of the following is a valid ORDER BY usage?

Logo

Q12: Can ORDER BY be used in subqueries?

Logo

Q13: What will SELECT * FROM table ORDER BY 2 do?

Logo

Q14: Which is more efficient for sorting indexed columns?

Logo

Q15: In which clause position should ORDER BY be used in a SQL query?

Logo

Q16: Which sorting orders are valid in ORDER BY?

Logo

Q17: What does ORDER BY salary DESC, name ASC do?

Logo

Q18: Which is the default order when ORDER BY is used without specifying ASC or DESC?

Logo

Q19: What will happen with ORDER BY salary NULLS FIRST?

Logo

Q20: Which RDBMS allows ORDER BY in CTE (Common Table Expression)?

Are you ready to start test? Set your time limit