SQL
All Top 50 SQL Interview Questions#6
Wildcard String Filtering Using LIKE and ILIKE in SQL
EasyInterview Question #6
Given a `products` table, find all products whose title contains 'Wireless' and whose SKU ends with '-PRO'. Return `product_id`, `title`, and `sku`.
Input Table: products
3 rows preview| product_id | title | sku | price |
|---|---|---|---|
| 1 | Wireless Bluetooth Headset | AUD-101-PRO | 2499 |
| 2 | Wired Gaming Mouse | ACC-202-PRO | 1299 |
| 3 | Wireless Ergonomic Mouse | ACC-303-STD | 1899 |
Expected Output Structure1 rows
| product_id | title | sku |
|---|---|---|
| 1 | Wireless Bluetooth Headset | AUD-101-PRO |
Interview Context
Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.
PostgreSQL 15
Ready to execute
Click "Run Query" or press Ctrl + Enter to test your query.
Output will be verified against the test dataset.