Page 1 of 1

Ranking the data both from above and below

Posted: Tue Dec 02, 2003 4:14 am
by bapajju
Hi all,
I have to extract top 10 sales man (in terms of number of units they have sold) and bottom 10 sales man.The data is coming through a comma separated flat file. Can I get the top and bottom 10 sales man from this data file without putting the data into any temporary table???Please suggest.

Posted: Tue Dec 02, 2003 10:23 am
by ray.wurlod
If it's not already sorted, get it sorted; use a UNIX sort, the Sort stage, or the CoSORT plug-in (from the folks who host this site). Run the results through a Transformer stage, with an output link constraint such as @INROWNUM <= 10.
Similarly, sort in descending order to get the other end of the range.