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

Hi i need to create a SQL coding for orcale database please create a code for th

ID: 3548571 • Letter: H

Question

Hi i need to create a SQL coding for orcale database


please create a code for the bellow 7 questions will reward 7,000 points to best anwser


can email me too if you have questions email is livingnightmare101 and it is at hotmail.com


thanks!



for example....

List the name of division that ALL employees are working on some project(s). Namly, there not exists an employee who do not work on any project in that division.


anwser for it is...


select dname

from division

where not exists

(select *

from employee e,

where e.did = d.did and

e.empid not in

(select w.empid

from workon w)


1. List the name of division that has highest total project budget


2. List the name of division that has more than 1 project that has budget below $4000


3.Among all employees who work on DB development, list the name of employee who make least salary.



4. List the name of the division that has more projects than division of marketing


5.List the name of project that is sponsored by chens division


6.List the name of employee who do not work on a project with budget below $3500


7.Increase the salary of an employee by 10% if he/she works on more than 2 projects (hint: use structure ... where 2> (select count(*) ...))




Explanation / Answer

1) List the name of division that has highest total project budget


select dname from division, budget

where division.did=project.did

and division.did in (

select did from(

select did, DENSE_RANK() OVER (PARTITION BY did ORDER BY sum_budget desc) rank

(select

select did,sum(BUDGET) sum_budget from project group by did

)

) where rank = 1);



2) List the name of division that has more than 1 project that has budget below $4000


select dname from division where did in

(

select did from

(select did from(

select did, count(did) OVER (PARTITION BY did) cnt

) where cnt> 1) more_1_proj,

(select did from(

select did, sum(budget) sum_budget from project group by did

) where sum_budget < 4000) bgt_blow_4000

where more_1_proj.did = bgt_blow_4000.did

);




3) Among all employees who work on

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