task LIKE · easy
Find the lamps
Return the id and name of catalog items whose name contains “lamp” anywhere, in any letter case.
what to return
- Columns
idnamein this order- Rows
- 2 rows · any order
- Watch for
- “Desk Lamp” and “Floor lamp” both count.
- Skill
- Search text with LIKE and wildcards. Refresher: Lists & text patterns →
expected result
Your query should return exactly these columns and values. Run it and compare.
expected result2 rows · any order
| id | name |
|---|---|
| 1 | Desk Lamp |
| 2 | Floor lamp |
all 2 rows
data you can query
Sample rows from each table. Each column shows its type underneath; → marks a link to another table.
catalog_items4 columns · 13 rows
| idinteger · key | nametext | categorytext | pricereal |
|---|---|---|---|
| 1 | Desk Lamp | Lighting | 39 |
| 2 | Floor lamp | Lighting | 89 |
| 3 | String Lights | Lighting | 19.5 |
| 4 | Chef Knife | Kitchen | 59 |
| 5 | Cast Iron Pan | Kitchen | 45 |
showing 5 of 13 rows
solution.sql
Hints and the answer are always available. Using them counts the question as solved with help.