Question:

Consider the following database tables of a sports league. player (\( pid \), \( pname \), \( age \)) coach (\( cid \), \( cname \)) team (\( tid \), \( tname \), \( city \), \( cid \)) members (\( pid \), \( tid \)) An instance of the table and an SQL query are given. Player table

coach table:

team table:

members table:

SQL query: \[ {SELECT MIN(P.age)} \] \[ {FROM player P} \] \[ {WHERE P.pid IN (} \] \[ { SELECT M.pid} \] \[ { FROM team T, coach C, members M} \] \[ { WHERE C.cname = 'Mark'} \] \[ { AND T.cid = C.cid} \] \[ { AND M.tid = T.tid)} \] The value returned by the given SQL query is __________. (Answer in integer)

Show Hint

To solve SQL queries involving JOIN operations between multiple tables, ensure that you carefully follow the relationships between the tables (e.g., matching \( cid \) and \( tid \) between coach, team, and members tables) and identify which rows satisfy the conditions.
Updated On: Jan 30, 2026
Hide Solution
collegedunia
Verified By Collegedunia

Correct Answer: 26

Solution and Explanation

The SQL query returns the minimum age of players who are in teams coached by "Mark". 1. The query first finds the teams where the coach is "Mark". From the coach table, we can see that "Mark" has \( cid = 102 \).
2. Next, it finds the teams coached by "Mark" in the team table. The team with \( cid = 102 \) is "MI" (with \( tid = 10 \)).
3. Then, the query finds the players who are part of team "MI". From the members table, players with \( tid = 10 \) are:
- Player 1 (Jasprit)
- Player 3 (Ishan)
4. The ages of these players are:
- Player 1 (Jasprit): 31
- Player 3 (Ishan): 26
5. The minimum age among these players is 26. Thus, the value returned by the given SQL query is 26.
Was this answer helpful?
0
0

Top Questions on Database Management Systems

View More Questions