Introduces wildcards in query filters, plus using the IN keyword to match multiple values
- [Instructor] This query here returns us 10 rows.…But if you want to save yourself a bit of typing…you could use the IN statement…when adding WHERE clauses to the same field.…So instead of all these rows here…we could delete that and say…WHERE first_name IN…and then we use parentheses or brackets…and then we list all of the allowable values.…Like so.…And if we click go on that…we get the same 10 rows that we had before.…So the IN statement saves you more time…the more values you have.…
And it should be read as…matches any of the following.…You can also use NOT IN…to identify the values you want to exclude.…And we see that's returned as 190 rows…which is what we'd expect.…Note that we've put single quote marks around each value…because each one of these is a string or text.…You can put as many values as you like…into the brackets here…as long as they're all separated by commas.…SQL will also let you use wild cards…to match part of a text.…
Let's say we want to select any actor…with a name starting with the letters…J-O-H-N.…
Join Emma Saunders as she shows you how to design and write simple SQL queries for data reporting and analysis. Review the different types of SQL, and then learn how to filter, group, and sort data, using built-in SQL functions to format or calculate results. Learn a bit about data types and database design. Discover how to perform more complex queries, such as joining data together from different database tables. Last but not least, Emma shows how to save your queries as views, so you can run them again and again.
- Using different versions of SQL
- Retrieving data with SELECT statements
- Filtering and sorting your results
- Transforming results with built-in SQL functions
- Grouping SQL results
- Merging data from multiple tables
- Identifying data types, and how to make sense of your database design
- Saving SQL queries
Skill Level Intermediate
1. Use SQL to Report Data
Data types in SQL databases5m 47s
2. Group your SQL Results
3. Merge Data from Multiple Tables
4. Advanced Features and Taking Your Learning Forwards
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.