Combining conditions: AND, OR, NOT
Ask for rows that match several conditions.
AND keeps a row only when both conditions are true. OR keeps a row when at least one is true. NOT flips a condition. When you mix AND and OR, SQL does the ANDs first (like multiplication before addition in math), so use parentheses to say exactly what you mean.
SELECT title FROM books
WHERE genre = 'Fiction' AND pages < 300;Keeps only books that are Fiction and also shorter than 300 pages. Here that is just Stars Over Lagos.
Each side of AND/OR must be a complete condition. WHERE city = 'Hillview' OR 'Lakeside' does not do what it looks like; write WHERE city = 'Hillview' OR city = 'Lakeside'.