Which of the following query finds the total rating of the sailors who have reserved boat "103"?

Which of the following query finds the total rating of the sailors who have reserved boat "103"? Correct Answer SELECT SUM(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103

To find the total rating of the sailors who have reserved boat "103," you should use the SQL query SELECT SUM(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103; (Option D). This query correctly joins the "sailors" and "reserves" tables on the sailor ID (s.sid) and specifies the boat ID (r.bid) to be "103." It then calculates the sum of the ratings (s.rating) of the sailors who have reserved this boat. Option D is the correct choice for achieving this result.

Related Questions

Consider the following relation schema Sailors(sid, sname, rating, age) Reserve(sid, bid, day) Boats(bid, bname, color) What is the equivalent of following relational algebra query in SQL query. πsname((σcolor= ‘red’Boats) ⨝ Reserves ⨝ Sailors)  
Which of the following query finds the names of the sailors who have reserved at least one boat?