Summary

Get an overview of what we’ve covered in this chapter.

We'll cover the following

Learning outcome

In this chapter, we learned to query and get useful information. We went over how to combine data from two or more different tables. Combining information wasn’t restricted to information coming from tables only, but it was instead done using subqueries.

We also learned about the aggregate function sum() and how it can be used to gain useful insights into our data. We learned about the join clause and how we can combine the information that exists in more than one table. We also learned how to attach labels to column headers, make those headers easier to read, and select to display specific columns from a wide result set. Additionally, we counted distinct values in order to get accurate count results.

We gained an understanding of the left join and how we can combine information from two tables even if their rows don’t reference each other. We examined the concept of no value and how it’s represented in SQL, and we learned how to limit the result set to the columns of one table, even if SQL query joins many tables. Finally, we learned how to join information from two different queries.

Get hands-on with 1200+ tech skills courses.