St. Xavier'S College B.SC Computer Science Hons (2nd Year) SQL Assignment Sheet
St. Xavier'S College B.SC Computer Science Hons (2nd Year) SQL Assignment Sheet
XAVIER'S COLLEGE
B.Sc Computer Science Hons [2nd Year]
SQL Assignment Sheet
iii) Find customers who have the second largest discount. The customer list must be in
sorted order.
ii) Find the names of faculty members who teach in every room in which some class
is taught.
iii) Find the names of students who are enrolled in the maximum number of
classes .The students name must be in sorted order in the output.
ii) Find the name of the sailors with the highest rating.
Select sname from sailors s where 1>(select count(*) from sailors where
s.rating<rating);
iii) For each red boat find the number of reservations for this boat.
7. Consider the relational schema defined in Q6.Create relations, define constraints and enter
data through a user-friendly form.
a) Create Views for:
i) Customers with annual revenue between 10 lakh and 100 lakh
ii) Customers with annual revenue over 100 lakh