11,704,509 members (57,612 online)
Rate this:
See more:
i have table- student.which is having fields studentid,studname,mark.i want to get the student name who is having the 3rd highest mark.number of rows are not known,i dont know whether it is required for the calculation,if yes assume any number and give me the answer.thanks in advance
Posted 26-Jun-12 17:00pm

Rate this:

## Solution 2

Try this:
```SELECT
TOP 1 marks
FROM
(SELECT DISTINCT TOP 3 marks FROM student ORDER BY marks DESC) a ORDER BY marks```
Or this one
```WITH Results as
(SELECT Row_Number() over (ORDER BY marks DESC) as RN,* FROM student)
SELECT * FROM student WHERE RN=3```
sravani.v at 27-Jun-12 0:08am

My 5! for first query

Thank you Sravani!
sravani.v at 27-Jun-12 4:44am

No...searching for another job.

Where?
Rahul Rajat Singh at 27-Jun-12 3:01am

Nice. +5.

Thank you Rahul!
subin joseph at 27-Jun-12 6:50am

what does 'a' in this query stand for.is it any object
Sebastian T Xavier at 28-Jun-12 0:35am

Rate this:

## Solution 3

Hi ,
Check this also
```select MAX(marks) from student where marks <
(select MAX(marks) from student where marks <
(select MAX(marks) from student ))```
Best Regards
M.Mitwalli
Rate this:

## Solution 1

How about applying the answers to sql query to find 2nd maximum salary[^]?