
Pro products
easyPro products
Best Buy SQL Interview Question
Best Buy's product team is reviewing its premium range. A product belongs to the premium range if its name contains the word "Pro".
List the product_name of every product in the premium range. The match is case-sensitive, so "Pro" counts but "pro" does not.
Asked of
- Data Analyst
- Business Analyst
- BI Analyst
- Product Analyst
- Analytics Engineer
- Data Engineer
- Data Scientist
- ML Engineer
- AI Engineer
productsTable16 rows
| Column Name | Type |
|---|---|
| product_id | BIGINT |
| product_name | VARCHAR |
| category | VARCHAR |
| brand | VARCHAR |
| price | DOUBLE |
| discount_pct | BIGINT |
| stock_quantity | BIGINT |
| launch_date | DATE |
| is_active | BOOLEAN |
productsExample Input
| product_id | product_name | category | brand | price | discount_pct | stock_quantity | launch_date | is_active |
|---|---|---|---|---|---|---|---|---|
| 1 | Wireless Mouse | Electronics | Logitech | 24.99 | 10 | 150 | 2023-02-14 | true |
| 2 | Mechanical Keyboard Pro | Electronics | Keychron | 119 | NULL | 40 | 2023-05-01 | true |
| 5 | Ergonomic Chair Pro | Furniture | Steelcase | 1299 | 5 | 5 | 2021-06-30 | true |
| 7 | USB-C Hub | Electronics | Anker | 45 | 20 | 200 | 2023-03-22 | true |
| 11 | Webcam Pro 4K | Electronics | Logitech | 149 | NULL | 25 | 2024-03-18 | true |
| 14 | Portable SSD 1TB | Electronics | Samsung | 109.99 | 12 | 35 | 2023-07-17 | true |
| 16 | Waterproof Backpack | Accessories | Osprey | 79.99 | 10 | 45 | 2024-06-10 | true |
Example Output
| product_name |
|---|
| Ergonomic Chair Pro |
| Mechanical Keyboard Pro |
| Webcam Pro 4K |
Explanation
The Mechanical Keyboard Pro, Ergonomic Chair Pro and Webcam Pro 4K all have Pro in their names. The Waterproof Backpack contains pro with a lowercase p, so it does not count. The Portable SSD 1TB does not count either, because Portable does not contain the letters P, r and o next to each other.
The example above is a small slice of the data. Your query runs against the full tables.
Company
Best Buy
Difficulty
easy
Topic
filtering
Language
SQL
Your query
Starting the SQL engine...