Consider a table Employee(EmpID, TeamID), where the column EmpID (ID of an employee) is the primary key. The column TeamID denotes the team ID of the team of which the employee is a member. TeamID is a NOT NULL column. We want to display the size of the team (denoted as TeamSize) in which each employee is a member by using SQL. As an example, the desired output for the given Employee table is also shown in tabular form. Which of the following is/are correct? \(\textbf{Employee}\)\[\begin{array}{|c|c|} \hline \text{EmpID} & \text{TeamID} \\ \hline 1 & 8 \\ \hline 2 & 8 \\ \hline 3 & 8 \\ \hline 4 & 7 \\ \hline 5 & 7 \\ \hline 6 & 9 \\ \hline \end{array}\]\(\textbf{Output}\)\[\begin{array}{|c|c|} \hline \text{EmpID} & \text{TeamSize} \\ \hline 1 & 3 \\ \hline 2 & 3 \\ \hline 3 & 3 \\ \hline 4 & 2 \\ \hline 5 & 2 \\ \hline 6 & 1 \\ \hline \end{array}\]
- ASELECT E.EmpID, B.TeamSize FROM Employee AS E, (SELECT TeamID, COUNT(TeamID) AS TeamSize FROM Employee GROUP BY TeamID) AS B WHERE E.TeamID = B.TeamID
- BSELECT A.EmpID, COUNT(B.TeamID) AS TeamSize FROM Employee AS A, Employee AS B WHERE A.TeamID = B.TeamID AND A.EmpID = B.EmpID GROUP BY A.EmpID
- CSELECT B.EmpID, B.TeamSize FROM (SELECT EmpID, COUNT(TeamID) AS TeamSize FROM Employee GROUP BY EmpID) AS B
- DSELECT A.EmpID, B.TeamSize FROM Employee AS A, (SELECT COUNT(TeamID) AS TeamSize FROM Employee GROUP BY TeamID) AS B WHERE A.TeamID = B.TeamID