Lecture 4 - Aggregate Functions Flashcards
1
Q
What are aggregate functions?
A
Statistical summaries over a group of tuples
2
Q
Examples of aggregate functions?
A
COUNT(X) , SUM(X) , MAX(X) , AVG(X) , COR (X,Y)
3
Q
What is special about COUNT(X)?
A
It doesn’t count NULL values.
4
Q
What is a UDA?
A
User DEfine Aggregate
- definiting your own aggregate function
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;