Aggregate functions in SQL perform calculations on multiple rows of a table and return a single value. Common examples include SUM, COUNT, AVG, MIN, and MAX, which are widely used in reporting and analytics.
Time limit: 0
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Which function returns the total number of non-NULL rows in a column?
Correct
Incorrect
Question 3 of 15
3. Question
What does AVG() return?
Correct
Incorrect
Question 4 of 15
4. Question
Which function gives the smallest value in a column?
Correct
Incorrect
Question 5 of 15
5. Question
What does MAX() return?
Correct
Incorrect
Question 6 of 15
6. Question
What will COUNT(*) return?
Correct
Incorrect
Question 7 of 15
7. Question
What is the result of this query?
SELECT COUNT(DISTINCT department_id) FROM employees;
Correct
Incorrect
Question 8 of 15
8. Question
What will this query return?
SELECT SUM(salary) FROM employees WHERE department_id = 10;
Correct
Incorrect
Question 9 of 15
9. Question
Can aggregate functions ignore NULL values by default?
Correct
Incorrect
Question 10 of 15
10. Question
Which clause is most commonly used with aggregate functions?
Correct
Incorrect
Question 11 of 15
11. Question
What will `AVG(NULL)` return?
Correct
Incorrect
Question 12 of 15
12. Question
Which function will return the total number of employees regardless of NULLs?
Correct
Incorrect
Question 13 of 15
13. Question
What is the result of using SUM() on a VARCHAR column?
Correct
Incorrect
Question 14 of 15
14. Question
Which aggregate function can be used with the HAVING clause?
Correct
Incorrect
Question 15 of 15
15. Question
What does the following query return?
SELECT MAX(salary) – MIN(salary) FROM employees;
Correct
Incorrect
Summary
SQL aggregate functions such as `SUM`, `COUNT`, `AVG`, `MIN`, and `MAX` help perform summary operations on data. They’re widely used with `GROUP BY` and `HAVING` to generate meaningful reports and insights from large datasets.
At QuizOrbit, our team specializes in fun, informative quizzes across topics like general knowledge, technology, and entertainment. Boost your knowledge with our expert-designed quizzes.