February 2025
Beginner
304 pages
8h 8m
English
So far, you’ve been writing mostly queries that return an entire set of data, but as you write more purposeful SQL using larger sets of data, you’ll find that you need only a subset of the data instead of all the rows. You did work a bit in chapter 4 to reduce the number of rows returned using LIMIT and OFFSET, but those commands aren’t helpful for finding specific rows.
You may want only a report of sales for the past month, a list of orders with pending status, or a list of customers in New Hampshire, for example. All these scenarios have conditions for specific data being returned, and we apply those conditions using filtering. Filtering means taking the broader results of your data set and applying one or more ...