From the course: SQL Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Filter records based on more than one condition

Filter records based on more than one condition - SQL Tutorial

From the course: SQL Essential Training

Filter records based on more than one condition

- [Instructor] So far, we've responded to a number of managerial requests. And in our responses, we have only been looking at a single field. Now let's take a look at our last query that we constructed. And if we look at the WHERE clause, we've specified that the invoice date field is the field that we are currently filtering on and we've specified this May 22nd, 2010 date as the date that we are interested in. Our result shows the results of this particular criteria. Now in SQL, it is possible for us to use the AND and the OR operators to specify criteria from multiple fields. Now let's consider this latest managerial request from WSDA Music. Get a list of all invoices that were billed after May 22nd, 2010 and have a total of less than $3. Now, let's alter our SQL statement to satisfy this criteria. I'm going to switch out this equal sign for a greater than and that is because the first part of our request is asking…

Contents