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_iddish_displaycategory_normcode_norm
1Caesar SaladstartersHRC-001
2Margherita PizzamainsHRC-002
3TiramisudessertsHRC-003
PostgreSQLv16

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid