SQL Set Functions

Sometimes, the information that you want to extract from an SQL table doesn't relate to individual rows but rather to sets of rows. SQL provides five set (or aggregate) functions to deal with such situations — COUNT, MAX, MIN, SUM, and AVG. Each function performs an action that draws data from a set of rows rather than from a single row:























COUNTReturns the number of rows in the specified table
MAXReturns the maximum value that occurs in the specified
table
MINReturns the minimum value that occurs in the specified
table
SUMAdds up the values in a specified column
AVGReturns the average of all the values in the specified
column








dummies

Source:http://www.dummies.com/how-to/content/sql-set-functions.html

No comments:

Post a Comment