From the course: MySQL Data Analysis

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Combining WHERE and AND

Combining WHERE and AND - MySQL Tutorial

From the course: MySQL Data Analysis

Combining WHERE and AND

- [Instructor] Now you've learned how to filter down your dataset using a where clause. But what if instead of applying just one filtering criteria, you wanted to apply multiple criteria at the same time? You're able to include multiple logical conditions within one where clause when you use an "and" statement. When you use "and", the server will only return records which satisfy all criteria you list. Here's a pro tip on getting up to speed on this quickly. Write a SQL statement with a where clause, look at the results, then add another condition using an "and" statement, and see how the results change. Do this over and over again with various conditions, and you'll pretty quickly get up to speed on this. Here's an example of a SQL statement that has a where clause with multiple conditions in it. Previously, we've worked with our payment data, and filtered it down to records where amount equals 99 cents. We've also used that payment data and filtered it down to records where payment…

Contents