Question: a . Write the SQL code to create a view, EmployeeGrades, in which we can store the EmployeeID and Grade of each employee. Compute the
a Write the SQL code to create a view, EmployeeGrades, in which we can store the EmployeeID and Grade of each employee. Compute the grade as described above.
Marks
b For each of the queries below, answer in Relational Algebra as well as SQL form:
i Show the EmploveeName, Salary and DepartmentName for all the managers.
ii Show the EmployeeName and Grade for all employees working atLocation'NewYork'.
iii. Show for the EmploveeName'Smith' the maximum possible raise in Salary in the same Grade.
c For each of the queries below, answer in SQL forntonly.
Marks
i Show the sum of Salary of employees in a department and the DepartmentName for each department. Assume DepartmentName is also unique field.
ii Show the EmployeeName for all the employees in the salary GradeG You must use a nested query for this.
Note: The fields that must appear in the output are typed in Italic.
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
