Well, first you have to store the nicks + the number or whatever else that you're sorting it by. You mentioned "rich," so I assume that it's a numerical value. If so, /write the values to a text file so it looks something like:
name1 432523
name2 332465
name3 243535
/filter -ffcute 2 32 filename.txt filename.txt
Then the filename.txt will have the sorted list and you can do whatever you want with it.
For more info:
/help /filter