http://www.flickr.com/photos/konnecke/922432859/ |
Data Summarization
SQL has aggregate functions that allow you to summarize large volumes of data. Summarizing data helps to determine trends. Many times data needs to be summarized with reports. Aggregate functions
take the values of multiple rows grouped together, i.e., values stored in a column, and returns a single value.
Common aggregate Microsoft SQL functions:
COUNT (Column name): Counts the rows in a column (excluding Null values)
FIRST(): Returns the first value stored in a column
LAST(): Returns the last value stored in a column
MAX(): Returns the highest value stored in a column
MIN(): Returns the lowest value stored in a column
SUM(): Returns the sum of values stored in a column