Database Assignment: Aggregate Functions, Nested Queries, Union, Intersect, Except Name__Shelly Rideout
Write the SQL code for the following queries (you do not have to give the results of the query)
1. List the employee id and sum of days duration for employees that have spent over total 100 days working on projects (use a having command and not a nested query).
select emp_id, sum(days_duration) AS totaldays
...> from project
...> group by emp_id
...> having sum(days_duration)>100;
2. Display the count of employees whose department is located in a flying air ship.
3. Display the title and birth date of the employees whose manager is Director Fury who have worked on a project with Loki as the villain (use INTERSECT).
4. Display the manager of the employee with the oldest project start date.
5. List the average cost of projects for employees who weakness is "no super power" and the average cost of projects for all other employees, create a new column that labels each total (use UNION ALL).
Attachment:- Attachments.rar