|
|
Archives of the TeradataForum
Message Posted: Mon, 23 Aug 2004 @ 12:15:53 GMT
Subj: | | Re: Alternative for Rank function |
|
From: | | R.Lakshman |
Hi Dieter,
I have found the alternative for the rank function.Just i would like to share the information.
SELECT A.salary_amount FROM employee A WHERE 10 = (SELECT DISTINCT
COUNT(B.salary_amount) FROM employee B WHERE A.salary_amount <= B.salary_amount);
this query gives me the desired result for finding the nth max value or min value in the table.the above query will give me the 10th max
value in the table.
Thanks & Regards,
Lakshman
| |