
This post will explain about how to find the Nth Maximum and Minimum Value in a Column. There are several methods to find out the Nth maximum/minimum value using SQL. This article discusses on such method to find Nth maximum value from a desired table.
Now write the following code:DECLARE @n INTSET @n=2SELECT USER_ID,username from( SELECT USER_ID,username,ROW_NUMBER() OVER(ORDER BY USER_ID...