
Electronics and accessories
easyElectronics and accessories
Best Buy SQL Interview Question
Best Buy is running a tech week sale that covers two categories: Electronics and Accessories.
List the product_name and category of every product in the sale.
Asked of
- Data Analyst
- Business Analyst
- BI Analyst
- Product Analyst
- Analytics Engineer
- Data Engineer
- Data Scientist
- ML Engineer
- AI Engineer
productsTable15 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 |
| 3 | Noise Canceling Headphones | Electronics | Sony | 299.99 | 15 | 0 | 2022-11-20 | true |
| 6 | Desk Lamp | Furniture | NULL | 39.5 | NULL | 80 | 2024-01-15 | true |
| 8 | Notebook Set | Stationery | Moleskine | 18 | NULL | 0 | 2022-09-01 | false |
| 10 | Laptop Stand | Accessories | Rain Design | 49.99 | 10 | 60 | 2023-10-05 | true |
| 12 | Monitor Arm | Accessories | NULL | 89 | 25 | 0 | 2022-12-12 | false |
| 13 | Cable Organizer | Accessories | NULL | 12.5 | NULL | 300 | 2024-04-01 | true |
| 14 | Portable SSD 1TB | Electronics | Samsung | 109.99 | 12 | 35 | 2023-07-17 | true |
Example Output
| product_name | category |
|---|---|
| Cable Organizer | Accessories |
| Laptop Stand | Accessories |
| Monitor Arm | Accessories |
| Noise Canceling Headphones | Electronics |
| Portable SSD 1TB | Electronics |
| Wireless Mouse | Electronics |
Explanation
Three Electronics products and three Accessories products appear in the example output. The Desk Lamp is Furniture and the Notebook Set is Stationery, so neither is part of the sale.
The example above is a small slice of the data. Your query runs against the full tables.
Company
Best Buy
Difficulty
easy
Topic
filtering
Your query
Starting the SQL engine...