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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Types of SQL operators2m 35s
-
(Locked)
Filter and analyze numeric data3m 56s
-
(Locked)
BETWEEN and IN operators4m 5s
-
(Locked)
Filter and analyze text data4m 58s
-
(Locked)
Search records without an exact match6m 19s
-
(Locked)
Filter and analyze using dates5m 48s
-
(Locked)
Filter records based on more than one condition3m 36s
-
(Locked)
Logical operator OR2m 39s
-
(Locked)
Brackets and order6m 1s
-
(Locked)
IF THEN logic with CASE9m 52s
-
-
-
-
-
-
-
-
-