WHERE and comparisons
Keep rows that match a condition.
WHERE comes after FROM and keeps only the rows where a condition is true. You compare a column with a value using = (equal), <> or != (not equal), < , > , <= and >=. Text values go inside single quotes, like 'Cooking'; numbers do not. The database checks the condition row by row and throws away rows where it is false.
SELECT title, pages FROM books WHERE pages > 300;Goes through all 12 books and keeps the ones with more than 300 pages. The 300-page boundary itself is not included: > means strictly greater.
Comparing text with = is exact: 'Cooking' and 'cooking' are different. Check how the values are written in the table (SELECT * helps) before you filter on them.
A common mistake is forgetting the quotes: WHERE genre = Cooking makes the database look for a column named Cooking.