Pro products

filtering

Pro 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

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
2Mechanical Keyboard ProElectronicsKeychron119NULL402023-05-01true
5Ergonomic Chair ProFurnitureSteelcase1299552021-06-30true
7USB-C HubElectronicsAnker45202002023-03-22true
11Webcam Pro 4KElectronicsLogitech149NULL252024-03-18true
14Portable SSD 1TBElectronicsSamsung109.9912352023-07-17true

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 Portable SSD 1TB does not count, 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.