9 Summarizing Data Flashcards
1
Q
What is an aggregate function
A
A way to summarize data without actually retrieving it. Operates on a set of rows to calculate and return a single value
2
Q
Example of aggregate functions
A
-AVG(columnName)
-COUNT(columnName) or ()
-MIN(columnName)
-MAX(columnName)
-SUM(columnName*)
3
Q
What’s the difference between COUNT(columnName) and COUNT(*)
A
COUNT(*) counts ALL the rows in a table (includes values and NULL)
COUNT(columnName) counts ONLY the number of rows in that column with a value (ignores NULL)