SQL Practical 8 (1)
SQL Practical 8 (1)
Systems
Practical :- 8
Er. No :-
Name:-
Prepared By :- Foram Gohel
Database Management Systems
Prepared
By :- Foram Gohel
Database Management Systems
1. Find the names of all people who work in the Consulting department.
Query:
Output:
2. Find the names of all people who work in the Consulting department and
who spend more than 20% of their time on the project with ID ADT4MFIA.
Query:
Output:
Output:
5. For each employee, list the employee ID, number of projects, and the total
percentage of time for the current projects to which she is assigned. Include
employees not assigned to any project.
Query:
Output:
8. For each employee ID, find the last name of all employees making
more money than that employee.
Query:
Output:
9. Rank the projects by revenue.
Query:
Output:
10. Find all dates on which projects either started or ended. Eliminate any
duplicate or NULL dates. Sort your results in descending order.
Query:
Output:
11. Use INTERSECT tofind the first and last name of all employees who both
work on the Robotic Spouse and for the Hardwaredepartment.
Query:
Output:
12. Use MINUS to find the first and last name of all employees who work on
the Robotic Spouse but not for theHardwaredepartment.
Query:
13. Find the first and last name of all employees who work on the Download
Client project but not the Robotic Spouse project.
Query:
14. Find the first and last name of all employees who work on the Download
Client project and the Robotic Spouse project.
Query:
Output:
15. Find the first and last name of all employees who work on the Download
Client project or the Robotic Spouse project.
Query:
Output:
16. Find the first and last name of all employees who work on the Download
Client project or the Robotic Spouse project but not both.
Query:
17. Using MINUS, find all of the departments without any projects.
Query: