Consider a relational database containing the following schemas.
Catalogue (primary key: sno, pno):
Suppliers (primary key: sno):
Parts (primary key: pno):
The primary key of each table is indicated by underlining the constituent fields.
SELECT s.sno, s.sname
FROM Suppliers s, Catalogue c
WHERE s.sno = c.sno AND
cost > (SELECT AVG (cost)
FROM Catalogue
WHERE pno = 'P4'
GROUP BY pno);The number of rows returned by the above SQL query is
Tap to open full sizeFigure description
Three relation tables (Catalogue, Suppliers, Parts) with the rows shown in the stem; primary key fields underlined: Catalogue (sno, pno), Suppliers sno, Parts pno.
- (A)
4
- (B)
5
- (C)
0
- (D)
2