Explains how to filter the select query using a WHERE clause, including combining multiple filters with and, or, and between
- [Instructor] So now we know how to adjust…the number of fields that are returned in a query.…We just list the field names and separate them with commas.…But so far we've always returned…all of the rows in the table.…Now, what if we want instead to only return actors…whose name is Penelope?…Then we would place a filter on the data…using the WHERE keyword.…Like so.…So we can say WHERE first_name equals 'PENELOPE'.…
And if we click Go, we can see we now have four rows…instead of 200 returned to us.…Now, what if we wanted to return all actors…except those called Penelope?…To indicate a Not in MySQL,…we use a less-than and greater-than sign, like so.…And you can see that's returned us 196 rows,…as we'd expect.…Equal signs and this not-equal sign are called operators.…
These two brackets taken together…are called the Not operator.…Using these two brackets should work in any version of SQL,…but you can alternatively use an exclamation mark…followed by an equals sign…if you're using a version other than MySQL.…So either of those can work as the Not operator.…
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
Data Visualization for Data Analystswith Bill Shander1h 31m Beginner
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.