MySQL – Aggregate Functions (SUM, AVG, COUNT) MCQ

MySQL – Aggregate Functions (SUM AVG COUNT) MCQ

1 / 25

1. What do aggregate functions in MySQL do?

2 / 25

2. Which aggregate function calculates the sum of numeric values in a column?

3 / 25

3. What does the AVG() function in MySQL calculate?

4 / 25

4. What does the COUNT() function in MySQL return when used with * (asterisk)?

5 / 25

5. Which aggregate function is used to count the number of non-null values in a column?

6 / 25

6. How do you use the GROUP BY clause with aggregate functions in MySQL?

7 / 25

7. What does the MIN() function in MySQL retrieve from a column?

8 / 25

8. Which aggregate function is used to find the maximum value in a column in MySQL?

9 / 25

9. What does the MAX() function return when used with a column containing only NULL values?

10 / 25

10. How can you filter grouped data in MySQL after using the GROUP BY clause?

11 / 25

11. What does the HAVING clause in MySQL allow you to do when used with GROUP BY?

12 / 25

12. Which aggregate function calculates the average of values in a column in MySQL?

13 / 25

13. What is the primary purpose of using the HAVING clause in MySQL?

14 / 25

14. How can you calculate the total number of rows in a result set in MySQL?

15 / 25

15. What is the primary purpose of using subqueries with aggregate functions in MySQL?

16 / 25

16. Which JOIN operation combines rows from two or more tables based on a related column?

17 / 25

17. In MySQL, what happens if you don’t use the GROUP BY clause with an aggregate function?

18 / 25

18. Which SQL clause is used for sorting data in MySQL?

19 / 25

19. What is the purpose of using the LIKE operator in a MySQL query?

20 / 25

20. Which wildcard character in MySQL matches any sequence of characters in a LIKE query?

21 / 25

21. How do you limit the number of rows returned by a MySQL query?

22 / 25

22. In a MySQL query, how do you negate a condition in the WHERE clause?

23 / 25

23. Which SQL operator is used to create complex conditions in the WHERE clause in MySQL?

24 / 25

24. What is the primary purpose of using aliases in a MySQL query?

25 / 25

25. What clause is used to specify conditions for filtering rows in a MySQL query?

Your score is

0%