Build a Savory-and-Sweet Combo
Problem
A cafe menu classifies every dish with a `flavor` of either 'Savory', 'Sweet', or 'Drink'.
A combo deal pairs one savory dish with one sweet dish. Write a query that lists every possible combo: each pairing of a 'Savory' dish with a 'Sweet' dish.
Return two columns, `savory` and `sweet`, holding the two dish names. The result may be returned in any order.
Tables
Example rows — the live problem includes the full dataset.
Dish
| dish_name | flavor | calories |
|---|---|---|
| Latte | Drink | 120 |
| Quiche | Savory | 310 |
| Panini | Savory | 420 |
Expected output
Your answer should return 9 rows with the columns savory, sweet.
Starter code (SQL)
SELECT *
FROM Dish;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock