Online Test Banks
Score higher
See Online Test Banks
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

SQL Set Functions

Part of the SQL All-in-One For Dummies Cheat Sheet

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
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

Inside Sweepstakes

Win an iPad Mini. Enter to win now!