Reputation:
Relations: Product(maker, model, type) Laptop(Model, price, speed, ram, hd, screen) PC(model, price, speed, ram, hd) Printer(model,price, color, price)
I am trying to find the printers with the highest price. I know I can find the printer with the highest price but how might I do this if there are multiple tuples that share the condition (highest price)
What I have tried:
SELECT model FROM printer HAVING COUNT(*) >= 1 WHERE price > all;
This is a terrible attempt I know, I am still trying to learn. But I can't do much when I come to a complete standstill.
Upvotes: 0
Views: 115
Reputation: 57593
I don't know if I understand your needs:
SELECT model FROM printer
WHERE price = (SELECT MAX(price) FROM printers)
Upvotes: 1