Podcast
Questions and Answers
What does the COUNT(*) function do?
What does the COUNT(*) function do?
- Counts all the number of rows of the table including null (correct)
- Sums up the values in the column
- Counts number of non-null values in a column
- Counts number of distinct values in a column
When is the DISTINCT keyword used?
When is the DISTINCT keyword used?
- To return the number of rows in the result
- To find the maximum value in a column
- To calculate the total sum of values in a column
- To perform calculations on unique values of a column (correct)
Which aggregate function returns the average value of a numeric column?
Which aggregate function returns the average value of a numeric column?
- COUNT
- SUM
- MAX
- AVG (correct)
What does the MAX function do?
What does the MAX function do?
What does the SUM function do?
What does the SUM function do?
Study Notes
Aggregate Functions
- The COUNT(*) function returns the total number of rows in a table or a specified column.
- The DISTINCT keyword is used to select only unique values from a column, eliminating duplicate values.
- The AVG function returns the average value of a numeric column.
- The MAX function returns the highest value in a numeric column.
- The SUM function calculates the total value of a numeric column by adding up all the values.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of aggregate functions in DBMS with this quiz. Explore the syntax and usage of aggregate functions like AVG, and practice writing queries to calculate average values from database tables.