Open In App

UGC-NET | UGC NET CS 2016 July – III | Question 11

Consider the following ORACLE relations :
R (A, B, C) = {, , , , , }
S (B, C, D) = {, , , , }.
Consider the following two SQL queries SQ1 and SQ2 :
SQ1 : SELECT R⋅B, AVG (S⋅B)
FROM R, S
WHERE R⋅A = S⋅C AND S⋅D SQ2 : SELECT DISTINCT S⋅B, MIN (S⋅C)
FROM S
GROUP BY S⋅B
HAVING COUNT (DISTINCT S⋅D) > 1;
If M is the number of tuples returned by SQ1 and N is the number of tuples returned by SQ2 then
(A) M = 4, N = 2
(B) M = 5, N = 3
(C) M = 2, N = 2
(D) M = 3, N = 3

Answer: (A)
Explanation:
Quiz of this Question

Article Tags :