{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sample HW5 Solution

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

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

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

{[ snackBarMessage ]}

Ask a homework question - tutors are online