Which of the following query finds the total rating of the travelers who have reserved boat 103

Discussion Forum

Que. Which of the following query finds the total rating of the sailors who have reserved boat "103"?
a. SELECT SUM(s.rating) FROM sailors s, reserves r AND r.bid = 103;
b. SELECT s.rating FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103
c. c) SELECT COUNT(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103
d. SELECT SUM(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103
Answer:SELECT SUM(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103