hi tanya!!! i tried this using transformations rather than writing a query ...chk out i took marks in desc order with sorter and ranks in ascending using ranking hope this helps
@Roopa, This is an interview question and the need is to write a query rather than using transformation.The hint is use of Self Join. Im still trying for the answer...
4 comments:
hi tanya!!!
i tried this using transformations rather than writing a query ...chk out i took marks in desc order with sorter and ranks in ascending using ranking hope this helps
@Roopa,
This is an interview question and the need is to write a query rather than using transformation.The hint is use of Self Join.
Im still trying for the answer...
Hi,
The answer for the query is as follows:
This can be done using a self join
SELECT A.ROLLNO,A.NAME,B.MARKS,RANK()OVER (ORDER BY B.MARKS DESC) FROM A1 A,A1 B WHERE A.ROLLNO=B.ROLLNO;
Regards
Tanya
Post a Comment