Problem: Help a Pet Lover
A customer wants a pet from your small pet shelter. Here’s what they’re looking for:
Only include pets that are less than 4 years old.
Do not include fish.
Show only the pet’s name and age.
Sort the results by name in alphabetical order.
The pets table
ID | Name | Type | Age |
1 | Coco | dog | 5 |
2 | Luna | cat | 3 |
3 | Goldie | fish | 1 |
4 | Max | dog | 4 |
5 | Bella | cat | 6 |
6 | Nemo | fish | 2 |
7 | Charlie | dog | 3 |
8 | Lily | cat | 2 |
9 | Rocky | dog | 7 |
Problem: Help a Pet Lover
A customer wants a pet from your small pet shelter. Here’s what they’re looking for:
Only include pets that are less than 4 years old.
Do not include fish.
Show only the pet’s name and age.
Sort the results by name in alphabetical order.
The pets table
ID | Name | Type | Age |
1 | Coco | dog | 5 |
2 | Luna | cat | 3 |
3 | Goldie | fish | 1 |
4 | Max | dog | 4 |
5 | Bella | cat | 6 |
6 | Nemo | fish | 2 |
7 | Charlie | dog | 3 |
8 | Lily | cat | 2 |
9 | Rocky | dog | 7 |