Consider a database that has the relation schema EMP (EmpId, EmpName, and…
GATE · 2017 · CS · Set 1 · Computer Science & IT
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below:

SELECT AVG(EC.Num) FROM EC WHERE (DeptName, Num) IN (SELECT DeptName, COUNT(EmpId) AS EC(DeptName, Num) FROM EMP GROUP BY DeptName)
The output of executing the SQL query is _____________ .
Attempted by 123 students.
Sign up free to check your answer
Sign up freeLoading lesson…