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
LastName VARCHARO
JobTitle VARCHARI
Salary DECIMAL
HireDate DATE
DepartmentlD INT
Table: Departments
DepartmentlD INT PRIMARY KEY
DepartmentName VARC HAR I
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 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
