Ask for Morty
WHERE, boundaries, AND, OR, parentheses, IN and BETWEEN · level 6 of 6
Opening your saved work…
Sign in to save across devices → · Download your guest work before switching accounts.
Ask for Morty · WHERE, boundaries, AND, OR, parentheses, IN and BETWEEN · level 6 of 6
Whose five-dollar budget?
Same idea as Ask for Morty, new data.
The owner offers a dollar off any item whose original price is at most $5. A teammate wrote SELECT id, name, price, price - 1 AS offer_price FROM menu_items WHERE price - 1 <= 5 ORDER BY price, id, and it returns 30 rows. Write the version that tests the original price: id, name, price and offer_price, cheapest first, ties broken by id. Then check one row the teammate kept that you leave out.
Finish line: 19 rows · columns id, name, price, offer_price · in the order the question gives
Data: Northshore Coffee.
Query results
Run your query to see the result here.Run your query to see the result here.
Practice here is evidence for you and your instructor, never a grade. Grades live in Canvas.