Search⌘ K
AI Features

Solution: Help a Pet Lover

Explore how to write an SQL query that retrieves pet names and ages from a table, filters out pets older than 3 years and excludes fish, then sorts the results alphabetically. This lesson helps you practice filtering rows, selecting columns, and ordering query results effectively.

We'll cover the following...
...
SELECT name, age
FROM pets
WHERE age < 4
AND type != 'fish'
ORDER BY name ASC;
...