Skip to content
Exercise · Databases and your first query · lesson 9 of 10

Exercise: food from cheapest to priciest

Write a query to the menu_items table that returns the name and price of every item in the food category: the columns name and price, cheapest first.

  • Croissant comes first, at 160.00.
  • Syrniki come last, at 310.00.

Constraints: drinks are not in the result, even when they are cheaper than the food. Food items all have different prices. If the menu has no food, the query returns zero rows.

food.sql — sql
sql · 3 lines
Ctrl+Enter run · Esc leave editor