Step: Filter and Sort with WHERE / ORDER BY

Filter and Sort with WHERE / ORDER BY

WHERE filters which rows come back, and ORDER BY controls the order they're returned in. You can combine them in the same SELECT.

For example, this selects only customers in the US, sorted by name.

SELECT * from customers
WHERE countryCode = "US"
ORDER BY name

Now, try it for yourself. Select all customers where countryCode is "US", ordered by name.

Step 7 of 8