Display roll having lowest marks in minimum 2 subjects?
Patni Computers written test question
Collapse
X
-
Tags: None
-
I think you might need to give a little more detail before anyone is able to help you here...Originally posted by sonia.sardanaDisplay roll having lowest marks in minimum 2 subjects? -
Lets consider this tables:Originally posted by sonia.sardanaDisplay roll having lowest marks in minimum 2 subjects?
student: studentid,stude ntname,studenta ddress
marks: studentid,subje ctcode,marks
Try this:
Code:SELECT s.studentname,s.studentid, x.subjectcode,x.marks FROM (SELECT studentid, subjectcode,marks,DENSE_RANK() OVER(PARTITION by subjectcode,ORDER BY marks ASC) rnk FROM marks) x,student s WHERE s.studentid = x.studentid
Comment
-
hello james.Its written test paper in patni,,they have given the same question....... .......They have all the questions of this type.....
If u want to see all the questions, I can send U.
Reply if u want to see or not............ ........Comment
-
Thx amit, its not working..Error is there in Query...
Even i m not able to understand it,............ .Is there any simple way?Comment
Comment