Write an SQL statement to display for every restaurant the name of the restaurant (where the name of the restaurant consists of more than 10 characters) and for every category of menu item its description (catdesc). Furthermore, display the average; cheapest or lowest; and highest or most expensive price of all menu items in that category at that restaurant. Use single row functions to format all the prices. The average price must be padded; the cheapest price must be rounded; but the highest price must not be rounded. Display only those menu items of which the average item price is more than R40. Sort your results according to the restaurant names and for every restaurant from the most expensive average menu item to the cheapest average menu item. Display your results exactly as listed below.

See Answers (1)

Accepted Answer

Using the knowledge in computational language in SQL it is possible to write the code that display for every restaurant the name of the restaurant  and for every category of menu item its description. Writting the code:INSERT INTO Dish Values(13, 'Spring Rolls', 'ap');INSERT INTO Dish Values(15, 'Pad Thai', 'en'); INSERT INTO Dish Values(16, 'Pot Stickers', 'ap');    INSERT INTO Dish Values(22, 'Masaman Curry', 'en');   INSERT INTO Dish Values(10, 'Custard', 'ds');   INSERT INTO Dish Values(12, 'Garlic Bread', 'ap');    INSERT INTO Dish Values(44, 'Salad', 'ap');    INSERT INTO Dish Values(07, 'Cheese Pizza', 'en');   INSERT INTO Dish Values(19, 'Pepperoni Pizza', 'en');    INSERT INTO Dish Values(77, 'Veggie Supreme Pizza', 'en');INSERT INTO MenuItem Values(0, 0, 13, 8.00);INSERT INTO MenuItem Values(1, 0, 16, 9.00);INSERT INTO MenuItem Values(2, 0, 44, 10.00);INSERT INTO MenuItem Values(3, 0, 15, 19.00);INSERT INTO MenuItem Values(4, 0, 22, 19.00);INSERT INTO MenuItem Values(5, 3, 44, 6.25);INSERT INTO MenuItem Values(6, 3, 12, 5.50);INSERT INTO MenuItem Values(7, 3, 07, 12.50);INSERT INTO MenuItem Values(8, 3, 19, 13.50);INSERT INTO MenuItem Values(9, 5, 13, 6.00);INSERT INTO MenuItem Values(10, 5, 15, 15.00);INSERT INTO MenuItem Values(11, 5, 22, 14.00);See more about SQL atbrainly.com/question/13068613#SPJ1

Related Question in Computers and Technology