I'm having a hard time creating a query for smth that sounds like this: what is the name and color of the items that cost more than grey box detergent(2 attributes: color:grey, type:detergent).
NOTE: I'm NOT allowed to user subqueries or use the price as a constant.
using subqueries I managed to get this:
SELECT name, color
FROM items
WHERE cost > (SELECT price FROM items WHERE type='detergent' AND color='grey');
any ideas on how can I get the above query without using a subquery?
I'm running out of ideas...