What are some common aggregate functions and how do they work? Explore some common aggregate functions.
- [Instructor] SQL provides a number of functions…that operate on aggregate values.…We'll select the world database for this exercise.…You've seen the count function before.…Looks like this.…And when I press go, I get a result of 239 rows…in the country table.…The count function with the asterisk parameter…is actually a special case for counting…all the rows in a table.…If you provide a column for counting,…it only counts the non-null values in that column,…so if I say population,…I get 232 instead of 239…because there are some null values…in the population column.…
The average function returns the average for a column,…so if I say A-V-G.…Now I get the average population in the entire table.…You can, of course, use group by…with any aggregate function.…So I can say, group by region,…and I can add region over here,…so we can see it in the results.…And now we get just the average population for each region,…and you'll notice than some of them are null.…
There's also min and max.…Min. I'll copy this and paste it, and use max,…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.