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
\table[[Worker_id,First_name,Last_name,salary,Joining_date,Department],[1,Monica,Arora,100000,2014-02-20,HR],[2,Niharika,Verma,80000,2014-06-11,Admin],[3,Vishal,Singhal,300000,2014-02-20,HR],[4,Amitabh,Singh,500000,2014-02-20,Admin],[5,Vivek,Bhati,500000,2014-06-11,Admin],[6,Vipul,Diwan,200000,2014-06-11,Account],[7,Satish,Kumar,75000,2014-01-20,Account],[8,Geetika,Chauhan,90000,2014-04-11,Admin],[9,Vivek,Bhati,100000,2014-02-20,HR]]
Bonus
\table[[Worker_ref_id,Bonus_date,Bonus_amount],[1,2016-02-20,5000],[2,2016-06-11,3000],[3,2016-02-20,4000],[5,2016-02-20,4500],[2,2016-06-11,3500]]
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 3 workers.
Write a query to display the first name, last name, and department for all workers who have or have not any bonus.
4.Write a query to display the name of the department, average salary and number of workers working in that department who got bonus.
Assignment / Nested queries Database Systems A .

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 Programming Questions!