Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1. Query Writing [4 Marks] Write SQL queries to accomplish the following tasks for HR database: Show the names of all the employees (first

Part 1. Query Writing

[4 Marks] Write SQL queries to accomplish the following tasks for HR database:

Show the names of all the employees (first name must contain the letter S), together with their job titles, department names, salary, street address, postal code and country names. Sort the result in the decreasing order according to salary.

Show all the department, names and salary in which the avg salary is larger than 5000.

Show all the departments in which the maximum salary is higher than the average salary of the company.

Show the first and last name, hire date and email of employees and the name of their department.

Show the first and last name of the highest earner employee in each Department.

Show maximum information about all the employees using all the tables.

Show the first name, last name, department_id and salary of highest earners.

Show the first name and salary of Employees and their managers first names and their salary, provided that, both should not be hired in the same year.

Part 2. Report Building

Create a Report that contains answers for the following questions, using report builder:

1. A report (generate tables) that displays the result of the following queries (given in part 1):

[1 Mark] Query 4

[1 Mark] Query 5

[1 Mark] Query 6

[1 Mark] Query 7

2. [1 Mark] A pie chart showing the total amount of salary paid in each department.

3. [1 Mark] A bar chart showing the number of employees managed by each manager.

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Initially timestamps on x are Time r (x) = 3 and Time w (x) =

Answered: 1 week ago

Question

Have issues been prioritized?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago