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
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.