

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: AS Clause in SQL
incomplete
2: SQL Functions
incomplete
3: Between
incomplete
4: Distinct
incomplete
5: Logical Operators – AND
incomplete
6: OR
incomplete
7: In
incomplete
8: Like
incomplete
9: Underscore Operator
incomplete
10: Wildcards Quiz
incomplete
11: Query Practice – Discount Program
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
We often need to use multiple conditions to retrieve the exact information we want. We can begin to structure much more complex queries by using multiple conditions together to narrow down the search results of our query.
The logical AND operator can be used to narrow down our result sets even more!
SELECT product_name, quantity, shipment_status
FROM products
WHERE shipment_status = 'pending'
AND quantity BETWEEN 0 and 10;
This only retrieves records where both the shipment_status is "pending" AND the quantity is between 0 and 10.
All of the following operators are supported in SQL. The = is the main one to watch out for – it's not == like in many other languages! SQLite does allow for ==, but it's not a good habit to get into, as other dialects of SQL will not recognize == as valid syntax.
=<><=>=<> or !=The legal restrictions in Canada have changed! The way we have to handle Canadian minors' CashPal transactions is more tightly regulated. We need to find all of those users, so we can see how many this change affects!
Write a query that retrieves all columns for users in the users table who are from Canada (CA) and under the age of 18.