Chapter 9 · Interview Level
05. Uppercase Product Names
Easy10 XPE-Commerce
The export team needs product names in uppercase for a data feed. Write a query that returns the product id, the original name, and the name converted to uppercase (as upper_name). Also include the length of each product name (as name_length). Sort by name_length descending.
Tables
- PKidINT
- nameTEXT
- FKcategory_id→ categories.idINT
- priceREAL
- costREAL
- stock_quantityINT
- created_atTIMESTAMP
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.