Question: Assignment / Nested queries Database Systems A . Given the following tables, write SQL statements that solve the following problems. Utilizing subqueries in the solution
Assignment Nested queries
Database Systems
A Given the following tables, write SQL statements that solve the following problems. Utilizing subqueries in the solution is proffered.
Worker
tableWorkeridFirstname,Lastname,salary,Joiningdate,DepartmentMonica,Arora,HRNiharika,Verma,AdminVishal,Singhal,HRAmitabh,Singh,AdminVivek,Bhati,AdminVipul,Diwan,AccountSatish,Kumar,AccountGeetika,Chauhan,AdminVivek,Bhati,HR
Bonus
tableWorkerrefidBonusdate,Bonusamount
Retrieve the workers who have the same first name and last name as the worker with the highest salary.
Display the first name, last name, and department for all workers who work in departments with more than workers.
Write a query to display the first name, last name, and department for all workers who have or have not any bonus.
Write a query to display the name of the department, average salary and number of workers working in that department who got bonus.
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
