Question
Consider a database consisting of the following tables (relations): SAILORS(sid, name, rating, age) BOATS(bid, name, color) RESERVED(sid, bid, day). Write SQL statement for each of
Consider a database consisting of the following tables (relations): SAILORS(sid, name, rating, age)
BOATS(bid, name, color)
RESERVED(sid, bid, day). Write SQL statement for each of the following queries.
(6) Find the names of the sailors who have a rating of at least 5 or reserved a red boat.
(7) Find the names of boats whose color is red or yellow.
(8) Find the colors of boats reserved by Smith.
(9) Find the names of sailors who have reserved a red or green boat.
(10) Find the names of sailors who have reserved a red boat and a green boat.
(11) Find the names of sailors who have reserved a red boat but not a green boat.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started