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

B) List the names of departments that have more than oneemployee who earns more

ID: 3617768 • Letter: B

Question

B) List the names of departments that have more than oneemployee who earns more than $30,000.
I tried the following for B) but I do not think isright?

select         dname,count(*)
   from        jps.department, jps.employee
   where       dnumber = dno and salary > 30000   
   group by     dname
   having       count(*)>1;
B) List the names of departments that have more than oneemployee who earns more than $30,000. I tried the following for B) but I do not think isright?
select         dname,count(*)
   from        jps.department, jps.employee
   where       dnumber = dno and salary > 30000   
   group by     dname
   having       count(*)>1;

Explanation / Answer

Here is how I would do it: select dname, count(dname) from jps.department, jps.employee where dnumber = dno and salary > 30000 group by dname having count (*) > 1; Good luck