Exercise: 21
Find out the maximum PC price for each maker having models in the PC table.
Result set: maker, maximum price.
Solution
SELECT p1.maker, MAX(p2.price)
FROM product p1
RIGHT JOIN pc p2 ON p1.model = p2.model
GROUP BY p1.maker
Exercise: 21
Find out the maximum PC price for each maker having models in the PC table.
Result set: maker, maximum price.
Solution
SELECT p1.maker, MAX(p2.price)
FROM product p1
RIGHT JOIN pc p2 ON p1.model = p2.model
GROUP BY p1.maker