MCQs > IT & Programming > PostgreSQL >

The names of those departments where there are more than 100 employees have to be displayed. Given two relations, employees and departments, which query should be used?

Employee

---------

Empno

Employeename

Salary

Deptno

Department

---------

Deptno

Departname


PostgreSQL MCQs

The names of those departments where there are more than 100 employees have to be displayed. Given two relations, employees and departments, which query should be used?

Employee

---------

Empno

Employeename

Salary

Deptno

Department

---------

Deptno

Departname


Answer

Correct Answer:

Select departname from department where deptno in (select deptno

from employee group by deptno having count(*) > 100);


Explanation:

Note: This Question is unanswered, help us to find answer for this one

PostgreSQL Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PostgreSQL Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it