Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 263 Bytes

ex21.md

File metadata and controls

15 lines (10 loc) · 263 Bytes

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