Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Will give best answer points and thumbs up ! Must be able to use on Oracle* Scri

ID: 3827594 • Letter: W

Question

Will give best answer points and thumbs up !

Must be able to use on Oracle*

Script:

1). Among all employees who work on “DB development”, list the name of employee who makes least salary.

2) List the name of the division that has more projects than division of “marketing”

3)List the name of employees who do not work in the same division with ‘chen’ but has more salary
than all employees of ‘chen’s division

4)Using update statement to increase the budget of a project if there are more than one employee working on it (hint: you may use structure ... where 1 > (select count()….)) (show data before and
after update)

Explanation / Answer

Hi,

Please find below the answer-

Ans - 1. select min(salary) from workon w join employee e on w.empid=e.empid join project p

on w.pid=p.pid where p.pname='DB development'

Ans 2- select dname,count(pid) from division d join project p on d.did=p.did group by dname
having count(pid) > (select count(pid) from division d join project p on d.did=p.did
where d.dname='marketing')

Ans 3- select name from employee where did <>(select did from employee where name='chen') and salary>(select max(salary) from employee where did =(select did from employee where name='chen'))

Ans 4- update project set budget=budget+1000 where pid in(select pid from(
select pid,count(empid) from workon group by pid having count(empid)>1))

Thanks and Regards,

Vinay Singh

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote