SQL Aggregate Functions Quiz

  • 11th Grade
Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By ProProfs AI
P
ProProfs AI
Community Contributor
Quizzes Created: 81 | Total Attempts: 817
| Questions: 16 | Updated: May 1, 2026
Please wait...
Question 1 / 17
🏆 Rank #--
0 %
0/100
Score 0/100

1. Which clause groups rows that have the same values in specified columns?

Explanation

GROUP BY is used in SQL to aggregate data by grouping rows that share the same values in specified columns. This clause is essential for performing operations like counting, summing, or averaging on grouped data, allowing for more organized and meaningful analysis of the dataset.

Submit
Please wait...
About This Quiz
SQL Aggregate Functions Quiz - Quiz

Test your understanding of SQL aggregate functions and data query language (DQL) concepts. This SQL Aggregate Functions Quiz covers essential techniques for summarizing data, including COUNT, SUM, AVG, MIN, and MAX functions, along with GROUP BY and HAVING clauses. Perfect for grade 11 students mastering intermediate SQL skills.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. The HAVING clause filters groups after aggregation, while WHERE filters ____.

Explanation

The WHERE clause is used to filter records before any aggregation takes place, allowing you to specify conditions on individual rows in a dataset. In contrast, the HAVING clause is applied after aggregation has occurred, enabling filtering of results based on the outcome of aggregate functions.

Submit

3. True or False: You can use COUNT(*) to count all rows, including NULL values.

Explanation

COUNT(*) counts all rows in a table, regardless of whether they contain NULL values or not. It provides a total number of rows, making it useful for determining the size of a dataset. Unlike other aggregate functions, COUNT(*) does not filter out any rows based on their content.

Submit

4. Which aggregate function returns the largest value in a column?

Explanation

MAX() is an aggregate function used in databases to determine the highest value in a specified column. It scans the data within the column and returns the maximum value, making it essential for statistical analysis and data summarization. Other options like LARGEST(), HIGH(), and TOP() are not standard SQL functions for this purpose.

Submit

5. What is the correct order of SQL clauses: SELECT, FROM, WHERE, GROUP BY, HAVING?

Explanation

In SQL, the correct order of clauses is essential for executing queries accurately. The sequence starts with SELECT to specify the columns, followed by FROM to indicate the data source. WHERE filters records, GROUP BY organizes the results into groups, and HAVING applies conditions to those groups, ensuring the query is processed logically and efficiently.

Submit

6. The MIN() function returns the ____ value in a column.

Explanation

The MIN() function is a standard SQL aggregate function that retrieves the minimum value from a specified column in a dataset. It evaluates all entries and identifies the lowest numeric or alphabetical value, making it useful for analyzing data trends or determining the least value in a set.

Submit

7. True or False: The SUM() function can only work with numeric data types.

Explanation

The SUM() function is designed specifically to perform arithmetic addition, which inherently requires numeric data types. It cannot process non-numeric types such as strings or dates, as these cannot be meaningfully summed. Therefore, the statement is true, as SUM() is limited to numeric inputs.

Submit

8. Which statement correctly uses GROUP BY to count employees per department?

Explanation

This SQL query accurately counts the number of employees in each department by selecting the department name and applying the COUNT function. The GROUP BY clause organizes the results into groups based on the department, allowing for an aggregated count of employees within each distinct department.

Submit

9. To find departments with more than 5 employees, use HAVING with ____.

Explanation

In SQL, the HAVING clause is used to filter groups based on aggregate functions. To find departments with more than 5 employees, you would use COUNT to tally the number of employees in each department and then apply HAVING to filter those groups where the count exceeds 5.

Submit

10. True or False: NULL values are always included in aggregate function calculations.

Explanation

Aggregate functions, such as SUM or COUNT, typically ignore NULL values in their calculations. This means that when performing operations like summing a column, any NULL entries are excluded, leading to results that reflect only the non-null entries. Therefore, the statement that NULL values are always included is false.

Submit

11. Which SQL keyword is used to eliminate duplicate values in a COUNT function?

Submit

12. Aggregate functions like SUM() and AVG() work on ____ of data, not individual rows.

Submit

13. Which aggregate function calculates the total sum of all values in a numeric column?

Submit

14. True or False: You must include all non-aggregated columns in a GROUP BY clause when using aggregate functions.

Submit

15. Which SQL aggregate function returns the total number of rows in a table?

Explanation

COUNT() is an SQL aggregate function specifically designed to return the total number of rows in a specified table or result set. It counts all rows that meet the specified criteria, making it essential for determining the size of a dataset or the number of occurrences of a specific value.

Submit

16. What does the AVG() function calculate?

Explanation

The AVG() function is designed to compute the mean of a set of numeric values in a specified column. By summing all the values in that column and dividing by the count of those values, it provides a single representative average value, making it useful for statistical analysis in databases.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (16)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which clause groups rows that have the same values in specified...
The HAVING clause filters groups after aggregation, while WHERE...
True or False: You can use COUNT(*) to count all rows, including NULL...
Which aggregate function returns the largest value in a column?
What is the correct order of SQL clauses: SELECT, FROM, WHERE, GROUP...
The MIN() function returns the ____ value in a column.
True or False: The SUM() function can only work with numeric data...
Which statement correctly uses GROUP BY to count employees per...
To find departments with more than 5 employees, use HAVING with ____.
True or False: NULL values are always included in aggregate function...
Which SQL keyword is used to eliminate duplicate values in a COUNT...
Aggregate functions like SUM() and AVG() work on ____ of data, not...
Which aggregate function calculates the total sum of all values in a...
True or False: You must include all non-aggregated columns in a GROUP...
Which SQL aggregate function returns the total number of rows in a...
What does the AVG() function calculate?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!