A menu without shouting or whispering
A menu without shouting or whispering
You are a data analyst at a chain of city cafes. Menu items were entered over the years by different managers: some typed dish names in ALL CAPS, some in lowercase, and categories are just as inconsistent. Marketing is launching a unified digital menu and wants the storefront brought to one style: dish names with each word capitalized, categories in lowercase, and the internal item code in uppercase to match the accounting system.
Return columns:
- item_id — menu item id (integer);
- dish_display — dish name where every word starts with a capital letter and the rest are lowercase;
- category_norm — category in lowercase; if the category is missing (NULL), keep NULL;
- code_norm — item code in uppercase.
Sorting: by item_id ascending. Return every row of the table, including items with no category.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.
| item_id | dish_display | category_norm | code_norm |
|---|---|---|---|
| 1 | Caesar Salad | starters | HRC-001 |
| 2 | Margherita Pizza | mains | HRC-002 |
| 3 | Tiramisu | desserts | HRC-003 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in