Lecture 4 - Aggregate Functions Flashcards

1
Q

What are aggregate functions?

A

Statistical summaries over a group of tuples

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

Examples of aggregate functions?

A

COUNT(X) , SUM(X) , MAX(X) , AVG(X) , COR (X,Y)

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

What is special about COUNT(X)?

A

It doesn’t count NULL values.

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

What is a UDA?

A

User DEfine Aggregate

  • definiting your own aggregate function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Example of aggregate function.

A

SELECT MAX (Salary) AS Highest_Sal,
MIN (Salary) AS Lowest_Sal,
AVG (Salary) AS Average_Sal
FROM EMPLOYEE
WHERE DNO = 5;

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