Database-Management-System
March 27, 2024
UGC NET CS 2015 June Paper-3
March 27, 2024
Database-Management-System
March 27, 2024
UGC NET CS 2015 June Paper-3
March 27, 2024

Database-Management-System

Question 443
The STUDENT information in a university stored in the relation STUDENT (Name, SEX, Marks, DEPT_Name) Consider the following SQL Query SELECT DEPT_Name from STUDENT where SEX = ‘M’ group by DEPT_Name having avg (Marks)>SELECT avg (Marks) from STUDENT. It Returns the Name of the Department for which:
A
The Average marks of Male students is more than the average marks of students in the same Department
B
The average marks of male students is more than the average marks of students in the University
C
The average marks of male students is more than the average marks of male students in the University
D
The average marks of students is more than the average marks of male students in the University
Question 443 Explanation: 
The query is co-related( same table is used in outer and inner query) so compare each entry of Student table 1 with each entry of Student table 2.

⇒ Consider this table for outer query i.e., LHS query of “>” symbol and here find avg. marks of a department because of group by constraint
i.e., avg. marks for CSE = 87.5
avg. marks for IT = 90


⇒ Consider this table for inner query i.e., RHS query of “>” symbol and here find avg. of total marks
i.e., avg. marks = 88.7
⇓ O/P of given query is
Correct Answer: B
Question 443 Explanation: 
The query is co-related( same table is used in outer and inner query) so compare each entry of Student table 1 with each entry of Student table 2.

⇒ Consider this table for outer query i.e., LHS query of “>” symbol and here find avg. marks of a department because of group by constraint
i.e., avg. marks for CSE = 87.5
avg. marks for IT = 90


⇒ Consider this table for inner query i.e., RHS query of “>” symbol and here find avg. of total marks
i.e., avg. marks = 88.7
⇓ O/P of given query is
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!!