Sample HW5 Solution

Solution select f rom w here u nion s elect f rom w

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: delete any rows from these tables. For each question below: • Write exactly one query that finds the answer; • Show both the query and its result (copy and paste) when executed in your Oracle account; • Your query should work irrespective of the actual contents of Sailors, Boats and Reserves, i.e., it should work for all possible instances of these relations. (a) Find sids and names of all sailors who have a rating of at least 5 and have reserved boat 104. Solution: select f rom w here a nd a nd S.sid, S.name Sailors S, Reserves R R.sid = S.sid S.rating >= 5 R.bid = 104; SID NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 22 Dustin (b) Find sids, names and age of all sailors wh...
View Full Document

This note was uploaded on 01/21/2014 for the course INFO 210 taught by Professor Stoy during the Winter '13 term at Drexel.

Ask a homework question - tutors are online