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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Example of aggregate functions

A

-AVG(columnName)
-COUNT(columnName) or ()
-MIN(
columnName)
-MAX(
columnName)
-SUM(
columnName*)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly