p.202
"For each red boat, find the number of reservations for this boat"
SELECT B.bid, COUNT (*) AS sailorcount
FROM Boats B, Reserves R
WHERE R.bid = B.bid AND B.color = 'red'
GROUP BY B.bid
Previous slide
Back to first slide
View graphic version