Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

image text in transcribed

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago