Combining Conditions and Boolean Operators Exercise Answers
SELECT customerid, order_date, item
WHERE (item <> 'Snow shoes') AND (item <> 'Ear muffs');
Note: Yes, that is correct, you do want to use an AND here. If you were to use an OR here, then either side of the OR will be true, and EVERY row will be displayed. For example, when it encounters 'Ear muffs', it will evaluate to True since 'Ear muffs' are not equal to 'Snow shoes'.
SELECT item, price
WHERE (item LIKE 'S%') OR (item LIKE 'P%') OR (item LIKE 'F%');
|SQL Course Curriculum|