SQL interview question: Search by Name Pattern With LIKE
Search Products by Name Pattern
The search team is testing a feature to find all products with 'Pro' in their names.
Find all products whose name contains 'Pro' (case-insensitive).
Return product_id, product_name, and price.
Skills: LIKE pattern matching and wildcards
Tables
products 20 rows
- product_id integer PK
- product_name text
- category text
- price real
- rating real
| product_id | product_name | category | price | rating |
|---|---|---|---|---|
| 1 | MacBook Pro | Electronics | 1999.99 | 4.8 |
| 2 | iPad Air | Electronics | 599.99 | 4.8 |
| 3 | AirPods Pro | Electronics | 249.99 | 4.7 |