Electronics and accessories

filtering

Electronics 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 NameType
product_idBIGINT
product_nameVARCHAR
categoryVARCHAR
brandVARCHAR
priceDOUBLE
discount_pctBIGINT
stock_quantityBIGINT
launch_dateDATE
is_activeBOOLEAN

productsExample Input

product_idproduct_namecategorybrandpricediscount_pctstock_quantitylaunch_dateis_active
1Wireless MouseElectronicsLogitech24.99101502023-02-14true
3Noise Canceling HeadphonesElectronicsSony299.991502022-11-20true
6Desk LampFurnitureNULL39.5NULL802024-01-15true
8Notebook SetStationeryMoleskine18NULL02022-09-01false
10Laptop StandAccessoriesRain Design49.9910602023-10-05true
12Monitor ArmAccessoriesNULL892502022-12-12false
13Cable OrganizerAccessoriesNULL12.5NULL3002024-04-01true
14Portable SSD 1TBElectronicsSamsung109.9912352023-07-17true

Example Output

product_namecategory
Cable OrganizerAccessories
Laptop StandAccessories
Monitor ArmAccessories
Noise Canceling HeadphonesElectronics
Portable SSD 1TBElectronics
Wireless MouseElectronics

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.