Q:

Which of the following query finds the name of the sailors who have reserved at least two boats?

belongs to collection: DBMS - SQL MCQ

0

Which of the following query finds the name of the sailors who have reserved at least two boats?


  1. SELECT DISTINCT s.sname FROM sailors s, reserves r1, reserves r2 WHERE s.sid = r1.sid AND r1.sid = r2.sid AND r1.bid ≠r2.bid
  2. SELECT DISTINCT s.sname FROM sailors s, reserves r1, reserves r2 WHERE s.sid = r1.sid AND COUNT(r1.bid) > r2.bid
  3. SELECT DISTINCT s.sname FROM sailors s, reserves r1, reserves r2 WHERE s.sid = r1.sid AND r1.sid = r2.sid AND r1.bid <> r2.bid
  4. All of these

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (c).SELECT DISTINCT s.sname FROM sailors s, reserves r1, reserves r2 WHERE s.sid = r1.sid AND r1.sid = r2.sid AND r1.bid <> r2.bid

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

DBMS - SQL MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which of the following query finds the total ratin... >>
<< What does the following query find?...