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:
COUNT | Returns the number of rows in the specified table |
MAX | Returns the maximum value that occurs in the specified table |
MIN | Returns the minimum value that occurs in the specified table |
SUM | Adds up the values in a specified column |
AVG | Returns 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