MS SQL Server Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
What Are Group Functions in Query Statements in MS SQL Server?
Answer:
Group functions are functions applied to a group of rows. Examples of group functions are:
* COUNT(*) - Returns the number of rows in the group.
* MIN(exp) - Returns the minimum value of the expression evaluated on each row of the group.
* MAX(exp) - Returns the maximum value of the expression evaluated on each row of the group.
* AVG(exp) - Returns the average value of the expression evaluated on each row of the group.
* SUM(exp) - Returns the sum value of the expression evaluated on each row of the group.
* COUNTDISTINCT(exp) - Returns the number of distinct values of the expression evaluated on each row of the group.
* COUNT(*) - Returns the number of rows in the group.
* MIN(exp) - Returns the minimum value of the expression evaluated on each row of the group.
* MAX(exp) - Returns the maximum value of the expression evaluated on each row of the group.
* AVG(exp) - Returns the average value of the expression evaluated on each row of the group.
* SUM(exp) - Returns the sum value of the expression evaluated on each row of the group.
* COUNTDISTINCT(exp) - Returns the number of distinct values of the expression evaluated on each row of the group.
Download MS SQL Server Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Filter Out Duplications in the Returning Rows in MS SQL Server? | How To Use Group Functions in the SELECT Clause in MS SQL Server? |