Unit 1, lesson 3 · WHERE with numbers
Filtering rows with WHERE
Products under $50
WHERE keeps only the rows that pass a test, and it goes right after FROM. For numbers, the comparison operators are = (equal), < and >, <= and >= for "or equal to", and <> for not equal. Many databases also accept != for not equal; <> works in all of them.
SELECT name, price
FROM products
WHERE price >= 100;Your task
Someone wants gift ideas under $50. List the name and price of every product that costs less than 50.
Tables you will use: products
Try it in your browserFree, no sign-up. Your query is checked as you go.