What You Have Learned

In this chapter, you expanded on the SQL concepts you learned in Chapter 8, “SQL Basics.” This chapter focused on some of the advanced uses of SQL. Very often, you will need to aggregate data through the use of the Sum(), Count(), and Avg() SQL aggregate functions. Depending on the granularity of detail you need, you will also need to incorporate the use of the Group By clause. In addition, the Min() and Max() functions provide a simple way to pull minimum and maximum values from a table for a given field.

After you aggregate data, it is very likely you will want to filter the resultset based on the calculated results. As you learned, the Where clause will not help you in this task. Rather, you need to make use of the ...

Get Absolute Beginner’s Guide to Databases now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.