I\'ve created a view that contains:
student_full_name subject_code result
Jennifer Higgins CS1234 81
Jennifer Higgins CS1235
Every problem as a solution, I created a table
CREATE TABLE STUD
(SNAME varchar(20),
SCODE NUMBER PRIMARY KEY,
MARKS NUMBER(4,2))
Inserted values
SNAME SCODE MARKS
--------------------
SAM 1001 90
VAS 1001 80
SAM 1002 60
ANAND 1001 80
VAS 1002 70
ANAND 1002 50
Query is
SELECT SNAME,AVG(MARKS) FROM STUD GROUP BY SNAME HAVING AVG(MARKS)>=
(SELECT MAX(MARKS ) FROM STUD WHERE SNAME='VAS')