Need help writing SQL for the following assignment 1 List la

Need help writing SQL for the following assignment!!!!

1. List lastname, firstname, and department for all employees 2. Repeat #1, using field aliases to rename lastname to Last Name] and firstname to [First Name] in the query output. 3. List only distinct lastname, firstname combinations (i.e., no duplicates) 4. Return the names and annual salary of the top (highest 15% of employees in terms of accrued sick leave. 5. Return the names and annual salary of the 15 lowest performing employees 6. For each employee list their full name and \"daily salary\" assuming 248 working days per year. 7. List the max, min, avg, and total sum of annual salary as well as count for employees of the engineering department. 8. List employees and the names of the projects they are working on (one record for each employee/project combination). Only include employees who are assigned to projects 9. Repeat #8, but this time include all employees even if they are not currently assigned a project. [this is a trick question. Explain why] 10. Repeat #8, aliasing the project table as PT and the employee table as EMP. Modify the query as needed to run

Solution

(1) SELECT firstname, lastname, department FROM EMPLOYEES;

(2) SELECT firstname AS [First Name], lastname AS [Last Name], department FROM EMPLOYEES;

(3) SELECT DISTINCT firstname, lastname FROM EMPLOYEES;

(4) SELECT firstname, salary FROM EMPLOYEES WHERE EMPLOYEES >= ((15*10)/100) ORDER BY salary;

Need help writing SQL for the following assignment!!!! 1. List lastname, firstname, and department for all employees 2. Repeat #1, using field aliases to rename

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site