Given two tables EMPLOYEE (EID, ENAME, DEPTNO) DEPARTMENT (DEPTNO, DEPTNAME) Find the most appropriate statement of the given query : Select count (*) 'total' from EMPLOYEE where DEPTNO IN (D1, D2) group by DEPTNO having count (*) > 5.
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. Total number of employees of departments D1 and D2 if their total is > 5.
Explanation
The query counts employees per department D1 and D2 and keeps only departments whose count exceeds 5.
More Database Management Systems questions
- Find the minimum number of tables required for converting the following entity relationship diagram into a relational database.
- Two concurrent executing transactions 1 and T 2 are allowed to update same stock item say ' A ' in an uncontrolled manner. In such scenario…
- Minimal cover of functional F dependency set is
- Identify primary key of table with F functional dependency set
- Identify the normal form in which relation R belong to
- Identify the redundant functional dependency in F