SQL provides simple and powerful tools for operating on aggregate data. Learn how aggregate functions operate on groups of rows, rather than individual rows.
- [Instructor] Aggregate data is information derived…from more than one row at a time.…SQL has powerful features for dealing with aggregate data.…We'll start with the world database here,…and if you've been following along you've…seen queries like this before.…Here I select the count of all the rows from Country…and the COUNT function is called an aggregate function.…It returns a single value from a query…that spans many rows of data.…
But what if I want to know how many countries are…represented in each region within the Country table?…This is where you start seeing the power…of aggregate functions in SQL.…'Cause if I say GROUP BY Region we'll go ahead…and add Region to the returned columns.…Now when I press Go I get all the different regions…and the count is the number of rows in each region.…
So the GROUP BY clause groups results…before calling the aggregate function.…This allows you to apply the aggregate function…to groups of data rather than the entire query.…In this case, the GROUP BY clause specifies…the Region column so it sorts the table by Region…
- 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.