Filtering Rows with WHERE
Learn how to filter rows with a where clause and operators.
Step 1: Start with a question
In Module 1, your queries returned everything. Now let’s get selective. Imagine you work with a table called employees. You might ask:
Write an SQL query to show which employees work in the Engineering department.
This time, you don’t want the entire table, just the rows that meet a specific condition.
Powered by AI
5 Prompts Remaining
Write a SQL query that shows the first name, last name, and department of employees who work in the Engineering department.
Step 2: Run and observe
AI might return:
Run it. Notice how you’re now seeing fewer rows. That’s because WHERE acts like a filter, it only shows rows that satisfy the rule.
Ask ...