1
503views
Advanced databse management system questions

Consider the following relational schema

Sailors (sid: integer, sname: string, rating: integer, age: real)
Boats (bid: integer, bname: string, color: string)
Reserves (sid: integer, bid: integer, day: date)

Create the tables along with necessary constraints and insert values appropriately.

Write the following queries in SQL:

  1. Find the sailors with highest rating.

  2. Find the average age of sailors for each rating level that has atleast two sailors .

  3. Find the names of sailors who have reserved both a red boat and a green boat.
  4. Create a view that displays the details of the sailors who resrved boats on 21-Oct?201

Note:[ Please update an answer before 12:00 A.M. (-_-) ]

Please log in to add an answer.