MS SQL Server – 21 – WHERE Clause MCQ

21 – WHERE Clause MCQ

Best of luck!

1 / 25

1. What is the primary purpose of the WHERE clause in SQL?

2 / 25

2. Which SQL keyword is used to filter rows in a WHERE clause based on a specific condition?

3 / 25

3. In SQL, what does the GROUP BY clause do?

4 / 25

4. Which aggregate function in SQL is used to calculate the average value of a numeric column?

5 / 25

5. What is the purpose of the HAVING clause in SQL?

6 / 25

6. Which SQL keyword is used to specify the column by which the result set should be sorted?

7 / 25

7. In SQL, how can you sort the result set in descending order using the ORDER BY clause?

8 / 25

8. What is the default sorting order in SQL when using the ORDER BY clause?

9 / 25

9. Which aggregate function in SQL is used to find the total number of rows in a result set?

10 / 25

10. In SQL, which clause is used to filter rows before they are grouped?

11 / 25

11. What is the purpose of the MAX() function in SQL?

12 / 25

12. Which SQL keyword is used to specify a condition in the HAVING clause?

13 / 25

13. In SQL, which aggregate function is used to find the highest value in a column?

14 / 25

14. What does the COUNT() function in SQL do?

15 / 25

15. In SQL, what is the purpose of the SUM() function?

16 / 25

16. Which SQL keyword is used to specify the order in which rows should be sorted?

17 / 25

17. What is the primary purpose of the MIN() function in SQL?

18 / 25

18. In SQL, what does the COUNT(DISTINCT) function do?

19 / 25

19. What is the purpose of the AVG() function in SQL?

20 / 25

20. In SQL, which aggregate function is used to find the lowest value in a column?

21 / 25

21. What is the purpose of the ORDER BY clause in SQL?

22 / 25

22. In SQL, what is the default sorting order when using the ORDER BY clause without specifying ASC or DESC?

23 / 25

23. Which SQL keyword is used to specify the columns to be included in the result set of a SELECT query?

24 / 25

24. What is the primary purpose of the HAVING clause in SQL?

25 / 25

25. In SQL, what is the purpose of the GROUP BY clause?

Your score is

0%