Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

6 8 . .

Answered: 1 week ago