For each red boat, find the number of reservations for this boat
Grouping over a join of three relations.
What do we get if we remove B.color=‘red’ from the WHERE clause and add a HAVING clause with this condition?
What if we drop Sailors and the condition involving S.sid?
SELECT B.bid, COUNT (*) AS scount
FROM Sailors S, Boats B, Reserves R
WHERE S.sid=R.sid AND R.bid=B.bid AND B.color=‘red’