0% found this document useful (0 votes)
10 views3 pages

Goutam Sailee

The document outlines SQL queries related to a database schema involving sailors, boats, and reservations. It includes tasks such as finding sailors who reserved specific colored boats, identifying sailors who reserved all boats on a specific date, incrementing ratings for sailors with PINK boats, and counting the number of boats for each sailor. The queries are intended for a class assignment in a computer science course.

Uploaded by

5rtys9c8fm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Goutam Sailee

The document outlines SQL queries related to a database schema involving sailors, boats, and reservations. It includes tasks such as finding sailors who reserved specific colored boats, identifying sailors who reserved all boats on a specific date, incrementing ratings for sailors with PINK boats, and counting the number of boats for each sailor. The queries are intended for a class assignment in a computer science course.

Uploaded by

5rtys9c8fm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Goutam D Irkal 2KE23CS042 CSE A DIV IV SEM

roll no 43 BCS403

Consider the Schema.

SAILORS (SID, SNAME, RATING, AGE)


BOATS (BID, BNAME, COLOR)
RESERVES (SID, BID, DAY).
Write the SQL queries for the following.

i). Find the names of sailors who have reserved a RED boat or a GREEN boat.
ii). Find the names of sailors who have reserved all boats on the date 15-aug-2010.
iii). Increment the entire sailor rating by 2 for all the sailors who sail PINK boats.
iV). Count the number of boats for each sailor.

Creating databases:
Goutam D Irkal 2KE23CS042 CSE A DIV IV SEM
roll no 43 BCS403

i). Find the names of sailors who have reserved a RED boat or a GREEN boat.

ii). Find the names of sailors who have reserved all boats on the date 15-aug-2010.
Goutam D Irkal 2KE23CS042 CSE A DIV IV SEM
roll no 43 BCS403

iii). Increment the entire sailor rating by 2 for all the sailors who sail PINK boats.

iV). Count the number of boats for each sailor.

You might also like