MCQ King
MySQL – Window Functions MCQ
1 / 26
1. What are MySQL window functions used for?
2 / 26
2. Which clause is used to define the window frame for a window function in MySQL?
3 / 26
3. What does the RANK() window function do in MySQL?
4 / 26
4. In MySQL window functions, what does the NTILE(n) function do?
5 / 26
5. How are rows within a partition ordered when using MySQL window functions?
6 / 26
6. Which window function can be used to calculate moving averages in MySQL?
7 / 26
7. What is the primary use case for ROW_NUMBER() in MySQL window functions?
8 / 26
8. Which window function assigns the same rank to identical values in MySQL?
9 / 26
9. What is the purpose of the PARTITION BY clause in MySQL window functions?
10 / 26
10. Which window function is suitable for assigning unique integers to rows within a partition?
11 / 26
11. What does the LAG() function do in MySQL window functions?
12 / 26
12. In MySQL, what is the primary purpose of the OVER() clause in window functions?
13 / 26
13. Which window function is used for ranking rows based on a specified column’s values?
14 / 26
14. In the context of MySQL window functions, what is a window frame?
15 / 26
15. How can you calculate a moving average of values in MySQL window functions?
16 / 26
16. What is the purpose of the LEAD() function in MySQL window functions?
17 / 26
17. Which window function can be used to divide a result set into equal parts in MySQL?
18 / 26
18. In MySQL window functions, how does DENSE_RANK() differ from RANK()?
19 / 26
19. Which SQL clause defines the order of rows within a partition in MySQL window functions?
20 / 26
20. What does the FIRST_VALUE() function return in MySQL window functions?
21 / 26
21. What is the primary purpose of the ORDER BY clause in MySQL window functions?
22 / 26
22. Which window function can be used to assign the same rank to identical values in MySQL?
23 / 26
23. In MySQL window functions, how does RANK() differ from DENSE_RANK()?
24 / 26
24. What is the main advantage of using MySQL window functions over subqueries for analytical tasks?
25 / 26
25. Which window function can be used to calculate the sum of values within a window in MySQL?
26 / 26
26. How can you calculate quartiles or percentiles using MySQL window functions?
Your score is
Restart quiz