COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
the sum of values in a column
|
|
average in the values in agroup.
|
|
maximum value from a column.
|
|
None of the above
|
Detailed explanation-1: -SQL Server AVG() function is an aggregate function that returns the average value of a group. In this syntax: ALL instructs the AVG() function to take all values for calculation. ALL is used by default.
Detailed explanation-2: -The AVG() function returns the average value of a numeric column.
Detailed explanation-3: -The AVG function returns the average (arithmetic mean) of the input expression values. The AVG function works with numeric values and ignores NULL values.
Detailed explanation-4: -The SQL AVG() function is used to find the average of values over records from a table. To understand this with an example, consider the following table that contains employee records.
Detailed explanation-5: -SQL AVG function is used to find out the average of a field in various records. You can take average of various records set using GROUP BY clause. Following example will take average all the records related to a single person and you will have average typed pages by every person.