A Tour of SQL
Lesson 4: Where conditions
You can apply where conditions to your query to filter on one or several fields.

As where conditions can become complex, they will be introduced in this and some of the following lessons. We start with the table tbl_customers that has the following structure:

customer_id (number), first_name (string), last_name (string)

To filter on a number, you often use the following comparison operators:

< (less than)
<= (less than or equal)
> (greater than)
<= (greater or equal)

Start playing around by changing the conditions in the right window. Try to output only datasets with customer_id > 20.



select customer_id, first_name, last_name from tbl_customers where customer_id < 50;