18l1382 Lab Repot 6 DB Updated
18l1382 Lab Repot 6 DB Updated
Lab Task:
We were asked to understand and run the given SQL Advanced set functions in our SQL management
server. We performed and following is the output of SQL commands;
1d
2b
2c
2d
2e
Exercise3: In the 3rd exercise we write SQL queries to answer the following questions:
1. Give the name(s) of employees who work either on project “ProductX” or on project
“ProductY”
2. Give the name(s) of employees who work both on project “ProductX” or on project
“ProductY”
3. Give the name(s) of employees who work on project “ProductY” but not on project
“ProductX”
6. Give the names(s) of employees who work on a project which is not controlled by
their own department.
Conclusions:
We studied and understood the advanced SQL commands and to be able to use these SQL
advanced commands and functions to use and retrieve data from databases.
Issues:
No issues.
Applications:
SQL advanced queries are used for retrieving the data from a database.
Post lab:
A. Give the name(s) of guest who have booking both for Watergate or Latham hotel.
B. Give the name(s) of guest who have booking either for Watergate and Latham hotel.
C. Give the name(s) of guest who have booking for Latham but not for Watergate hotel.
D. Display the name of the guest who has stayed in maximum number of hotels
E. Display the name of the hotel with as many rooms as Latham hotel
F. Display the name of the hotel with the cheapest room
Issue:
There was no issue during the lab work.
Conclusion:
A subquery is a select query that is enclosed inside another query. The inner select query is usually used
to determine the results of the outer select query. Subqueries are a major part of Advanced SQL.
Application:
SQL is compatible with most databases like Microsoft Access, MySQL, and others. Furthermore, since
most relational database management systems support SQL functions, one can use them to develop
application extensions that cater to procedural programming