February 2025
Beginner
304 pages
8h 8m
English
In the past few chapters, we examined ways to join tables based on the way they relate to one another. Every query we’ve written has had a single SELECT statement. But this chapter will show how to write a query with multiple SELECT statements and combine the results into a single set of data.
This technique can be useful when we need to evaluate results that require different conditions, such as querying values in different tables with no key to join them. Although we’ve seen that null values are excluded from results when we use joins, we’ll see how to use SQL to include null values if those values exist in two data sets and we want to include them in our results.
We’ve written ...