| 1. |
Write the purpose of the following SQL function:count()max()min()avg()sum() |
|
Answer» The built-in functions associated with GROUP functions in SQL are 1. COUNT function- returns the count of records that satisfies the condition for each group of records. 2. MAX function- returns the maximum values from the column for each group of records. 3. MIN function – returns the lowest values from the column for each group of records. SELECT department, MIN(salary)FROM employees GROUP BY department; 4. AVG function – returns the average values from the column for each group of records. 5. SUM function- returns the total values from the column for each group of records. |
|