[go: up one dir, main page]

0% found this document useful (0 votes)
74 views2 pages

Department of Information Technology::VRSEC: Assignment-II Questions

This document contains questions about SQL queries involving relations between sailors, boats, and reservations. It asks to: 1) Find names of sailors reserving red and green boats; sailors older than the oldest sailor with a rating of 10; and youngest eligible voters by rating. It also asks to find the average age of sailors with a rating of 10 and count unique sailor names. It then asks about aggregate functions, NULL values, correlated nested queries, joins, and set comparison operators. The document relates to formulating solutions to query problems using formal query languages.

Uploaded by

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

Department of Information Technology::VRSEC: Assignment-II Questions

This document contains questions about SQL queries involving relations between sailors, boats, and reservations. It asks to: 1) Find names of sailors reserving red and green boats; sailors older than the oldest sailor with a rating of 10; and youngest eligible voters by rating. It also asks to find the average age of sailors with a rating of 10 and count unique sailor names. It then asks about aggregate functions, NULL values, correlated nested queries, joins, and set comparison operators. The document relates to formulating solutions to query problems using formal query languages.

Uploaded by

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

Department of Information Technology::VRSEC

Assignment-II Questions

1. a. Consider the following relations CO3

Sailors (sid: Integer, sname: string, rating: integer, age: real)


Boats (bid: integer, bname: string, color: string)
Reserves (sid: integer, bid: integer, day: date)
Write SQL queries for the following
i) Find the names of sailors who have reserved both a red and a green boat
ii) Find the names of sailors who are older than the oldest sailor with a rating of 10
iii) Find the age of youngest sailor who is eligible to vote (i.e., at least 18 years old) for each
rating level with at least two such sailors.
iv) Find the average age of sailors with a rating of 10
v) Count the no. of different sailor names.

2. Discuss about aggregate functions with examples. CO3


3. Explain briefly about the NULL values. CO3
4. Explain the SQL operators associated with Corelated Nested Queries CO3
5. What are JOINS in SQL? Explain those using SQL queries. CO3
6. Explain in detail about Set Comparison Operators with examples CO3
CO3: Formulate solutions to a broad range of query problems using formal and Informal query

languages.

You might also like