Question 16524 – CMI PHD 2022
April 19, 2024
OOPS
April 19, 2024
Question 16524 – CMI PHD 2022
April 19, 2024
OOPS
April 19, 2024

Database-Management-System

Question 461
Consider the following ORACLE relations :

R (A, B, C) = {<1, 2, 3>, <1, 2, 0>, <1, 3, 1>, <6, 2, 3>, <1, 4, 2>, <3, 1, 4> }

S (B, C, D) = {<2, 3, 7>, <1, 4, 5>, <1, 2, 3>, <2, 3, 4>, <3, 1, 4>}.

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 < 7 GROUP BY R⋅B;

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
Question 461 Explanation: 

Correct Answer: A
Question 461 Explanation: 

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!