Friends,
I need a small help on a SQL Query (Oracle/MySQL).
Question: Find aggregate from top 4 subjects, among 6 subjects, of a student.
That is, I have to find what are the top/highest 4 subjects among 6 subjects, of a student. And then make sum of them.
Table Structure: (Single Table)
I need a small help on a SQL Query (Oracle/MySQL).
Question: Find aggregate from top 4 subjects, among 6 subjects, of a student.
That is, I have to find what are the top/highest 4 subjects among 6 subjects, of a student. And then make sum of them.
Table Structure: (Single Table)
- sid - char(5)
- student_name - varchar2(50)
- sub1 - num(3)
- sub2 - num(3)
- sub3 - num(3)
- sub4 - num(3)
- sub5 - num(3)
- sub6 - num(3)