GATE DA · 2026 · DA
Question 51: Database Management and Warehousing
Give it a try, then reveal the answer to check your work.
Question 51
DAMSQ2 marksNeeds review
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.
Employee
EmpID | TeamID |
|---|---|
1 | 8 |
2 | 8 |
3 | 8 |
4 | 7 |
5 | 7 |
6 | 9 |
Output
EmpID | TeamSize |
|---|---|
1 | 3 |
2 | 3 |
3 | 3 |
4 | 2 |
5 | 2 |
6 | 1 |
Which of the following is/are correct?
Your answerSelect all correct options. You can choose more than one.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerEXPLORE & PRACTISE
Paper and topic context
See where this question comes from and choose what to practise next.
2026DA
GATE DA 2026 · Paper 1
Data Science and Artificial Intelligence · Original paper archive
- Section
- Data Science and Artificial Intelligence
- Question type
- Multiple select (MSQ)
- Marks
- 2 marks
Practise related topics
Explore more previous year questions using this question’s imported topic tags.
data science
GATE DA previous year questions
artificial intelligence
GATE DA previous year questions
computing
GATE DA previous year questions
database management warehousing
GATE DA previous year questions
Database Management and Warehousing
GATE DA previous year questions
Comments
Ask a question, share your approach, or help someone understand.
Log in to view the discussion
You’re not logged in. Log in or create an account to see discussions and add comments.