Consider the following relational schema:
Students ($$\mathrm{\underline {rollno:integer}}$$, name: string, age: integer, cgpa: real)
Courses ($$\mathrm{\underline {courseno:integer}}$$, cname: string, credits: integer)
Enrolled ($$\mathrm{\underline {rollno:integer}}$$, $$\mathrm{\underline {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 ?$
Consider the following database tables of a sports league.
player(pid, pname, age)
team(tid, tname, city, cid)
coach(cid, cname)
members(pid, tid)
An instance of the table and an SQL query are given.
The value returned by the given SQL query is ________ . (Answer in integer)
Consider the following table named Student in a relational database. The primary key of this table is rollNum.
Student
rollNum | name | gender | marks |
---|---|---|---|
1 | Naman | M | 62 |
2 | Aliya | F | 70 |
3 | Aliya | F | 80 |
4 | James | M | 82 |
5 | Swati | F | 65 |
The SQL query below is executed on this database.
SELECT *
FROM Student
WHERE gender = 'F' AND
marks > 65;
The number of rows returned by the query is _____________.
Consider the relational database with the following four schemas and their respective instances.
Student( $$\underline {sNo} $$ , sName, dNo) Dept( $$\underline {dNo} $$ , dName)
Course( $$\underline {cNo} $$ , cName, dNo) Register( $$\underline {sNo} $$ , $$\underline {cNo} $$ )
SQL Query :
SELECT * FROM Student AS S WHERE NOT EXIST
(SELECT cNo FROM Course WHERE dNo = "D01"
EXCEPT
SELECT cNo FROM Register WHERE sNo = S.sNo)
The number of rows returned by the above SQL query is _____________.