Introduction to Joins

Learn the basics of joins and subqueries.

We'll cover the following

In this chapter, we’ll learn about the join clause and how we can combine information that exists in more than one table. We can attach labels to column headers to make those headers easier to read. We’ll select to display specific columns from a wide result set and count distinct values to get accurate count results. We’ll also learn about the left join and how we can combine information from two tables even if rows on the first table don’t reference rows on the second.

We’ll get into the concept of no value and how it’s represented in SQL. We’ll also limit the result set to the columns of one table even if the SQL query joins many tables. We’ll display a dynamically evaluated column and, finally, learn about the sum() aggregate function and group by clause.

Schema of customers_db

Let’s review the database schema of our customers_db database again.

Get hands-on with 1200+ tech skills courses.