0
0
DBMS Theoryknowledge~5 mins

Aggregate functions (COUNT, SUM, AVG, MAX, MIN) in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the COUNT function do in SQL?
COUNT returns the number of rows that match a specified condition or the total number of rows in a table if no condition is given.
Click to reveal answer
beginner
Explain the purpose of the SUM function.
SUM adds up all the values in a numeric column and returns the total sum.
Click to reveal answer
beginner
What does AVG calculate in a dataset?
AVG calculates the average (mean) value of a numeric column by adding all values and dividing by the number of values.
Click to reveal answer
beginner
How do MAX and MIN functions work?
MAX returns the highest value in a column, while MIN returns the lowest value.
Click to reveal answer
intermediate
Can aggregate functions be used with conditions? Give an example.
Yes, aggregate functions can be combined with WHERE clauses to filter data before aggregation. For example, SELECT COUNT(*) FROM users WHERE age > 30 counts rows where age is greater than 30.
Click to reveal answer
Which aggregate function would you use to find the total sales amount?
ACOUNT
BSUM
CAVG
DMAX
What does the COUNT function return when used as COUNT(*)?
ANumber of columns
BMaximum value
CSum of values
DNumber of rows
If you want to find the lowest price in a product list, which function do you use?
AMAX
BSUM
CMIN
DAVG
Which aggregate function calculates the average value?
AAVG
BCOUNT
CSUM
DMIN
Can aggregate functions be used without grouping data?
AYes, but only on entire table or filtered rows
BNo, never
CYes, always
DOnly with MAX and MIN
Describe what each aggregate function COUNT, SUM, AVG, MAX, and MIN does in simple terms.
Think about what you want to find: number, total, average, highest, or lowest.
You got /5 concepts.
    Explain how you can use aggregate functions with conditions to get specific results.
    Filtering data before aggregation helps get targeted answers.
    You got /3 concepts.