0
17kviews
Write SQL queries for the given database.

Write SQL queries for the given database.

Sailor (sid, sname, rating, age)

Boat (bid, bname, color)

Reserves (sid, bid, date)

i. Find the names of sailors who have reserved ‘red’ boat.

ii. Find the sailor (name) with highest rating.

iii. Find the average age of sailor.

iv. Find the age of youngest sailor for each rating level.

v. Add the new boat to database.

Assume any values for required attributes.

1 Answer
1
451views

Consider the following tables:

Sailor

sid sname rating age
1 Alan 8 26
2 Arina 7 25
3 Roone 9 30
4 Jeet 9 22
5 Rakesh 6 40

Boat

bid bname color
1 Alpha Ship White
2 Beta Ship Black
3 Gamma Ship Yellow
4 Delta Ship Red

Reserves …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.