SQL questions

Q55

GATE CS 2025 CS-1Relational QueriesNAT2 marks
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.
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)
Question figure
Show answer without attempting

Answer: 26

Q54

GATE CS 2025 CS-2Relational QueriesMSQ2 marks
Consider the following relational schema:

Students (rollno: integer‾\underline{\text{rollno: integer}}, name: string, age: integer, cgpa: real)
Courses (courseno: integer‾\underline{\text{courseno: integer}}, cname: string, credits: integer)
Enrolled (rollno: integer‾\underline{\text{rollno: integer}}, courseno: integer‾\underline{\text{courseno: integer}}, grade: string)

Which of the following options is/are correct SQL query/queries to retrieve the names of the students enrolled in course number (i.e., courseno) 1470?
More than one option can be correct.
Show answer without attempting

Answer: A, C, D

0/20 correct0 marks

Related topics in Relational Queries