Question: Each primary key is specified with a key icon. The one - to - many relationships are specified by using Note that in this question,
Each primary key is specified with a key icon.
The onetomany relationships are specified by using
Note that in this question, the names of foreign key are coincidentally the same as the names
of primary key being referenced.
Write SQL commands to answer the following queries.
c Write a query to get the average salary for all departments employing more than
employees. List the department ID average salary for the department and the
number of employees in the department.
marks
d Write a query to find the name firstname, lastname and the salary of the
employees who have a higher salary than the employee whose employee ID is
Hint: use subquery
marks
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
