Question: Table: Employees r EmployeelD INT PRIMARY KEY FirstName VARCHAR ( 5 0 ) LastName VARCHAR ( 5 O ) ' JobTitle VARCHAR ( I 0

Table: Employees r
EmployeelD INT PRIMARY KEY
FirstName VARCHAR(50)
LastName VARCHAR(5O)
' JobTitle VARCHAR(I00)
Salary DECIMAL(10,2)
.
HireDate DATE
DepartmentlD INT
Table: Departments
DepartmentlD INT PRIMARY KEY
DepartmentName VARC HAR( I 00)
ManagerlD INT
Foneign Key: Employees.DepartmentlD references Departments.DepartmentlD
Frame SQL queries for the following problems:
(i) Calculate the average salary per department.
(ii) List the employees with the highest salary in each department:
I
(iiD Find departments with more than 25 employees.
(iv) Get the employee names starting with 'S' in alphabetical order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!