GATE CS 2020 (Forenoon) — Question 23

Database Management Systems (DBMS)SQL Queries (DDL/DML, Joins, Aggregations)MCQ1 mark · −1/3 if wrongMedium

Consider a relational database containing the following schemas.
Question image
The primary key of each table is indicated by underlining the constituent fields.
sql
1SELECT s.sno, s.sname
2FROM Suppliers s, Catalogue c
3WHERE s.sno = c.sno AND
4      cost > (SELECT AVG (cost)
5              FROM Catalogue
6              WHERE pno = 'P4'
7              GROUP BY pno);
8
The number of rows returned by the above SQL query is
  1. A
    4
  2. B
    5
  3. C
    0
  4. D
    2
Practise the full 2020-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on SQL Queries (DDL/DML, Joins, Aggregations)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group