Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a query to display all employees with the total number of projects they work on , including employees with no assignment. Display six columns
Write a query to display all employees with the total number of projects they work on including employees with no assignment. Display six columnsEmployee Name, department number and name, # of projects, the total actual hours, total planned hours and the difference. List the employee name as first and last name with a space in between. Sort the results by the department in ascending order, then # of projects in ascending order. Your name should be in the result list. See sample output below. pts
IMPORTANT: You need to research how to use IFNULL function. No partial credit, if the format of your results is different than provided in the sample output.
Write a query to display all employees, the total number of projects they worked on and the total $ amount of the equipment used in those projects. If an employee does not have any assignment, you still must include those employees in the results list. Display four columnsEmployee SSN Employee Name, # of Projects, and Equipment Total. Format the employee SSN as shown below. List the employee first and last name with a space between. Format the equipment total with a dollar sign as shown below. Sort the results by equipment total in ascending order. See sample output below. Your output must match the sample output. pts
IMPORTANT: You need to research how to use the FORMAT function and add $ sign in the results. No partial credit, if the format of your results is different than provided in the sample output.
Write a query to display projects that have the difference between hours planned and hours worked is more than Display five columns. List the project number and name with a dash in between, name the column as Project the total hours planned as Hours Planned the total hours worked as Hours Worked the difference, and the number of employees worked in each project. Sort the results in descending order by the difference. See sample output below. Your output must match the sample output. pts
Write a query to display the managers SSN managers first and last name with a space between them, department number, department name, employees SSN employees first and last name with a space between them, and the following information about the employee's dependents: name, relationship and date of birth. The department number and name are that of the employee, not the manager. Name the columns as follows: Manager SSN Manager Name, Department, Employee SSN Employee Name, Dependent Name, Relationship and Dependent DOB. Sort the results by department number, employee SSN in all ascending order. See sample output below. pts
IMPORTANT: You need to research how to use SUBSTRING and DATEFORMAT functions.
No partial credit, if the format of your results is different than provided in the sample output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started