I don't if I understand you correctly. It will be much helpful if you post some of your data.
data investment;
input company $ year industry$ count;
datalines;
citi 2005 A 4
citi 2004 b 5
citi 2007 a 6
citi 2007 c 8
citi 2001 d 3
BOA 2005 d 6
BOA 2004 c 5
BOA 2007 f 1
BOA 2007 b 5
BOA 2001 a 3
;
run;
proc sort data=investment;
by company ;
run;
proc rank data=investment out=result ties=low descending;
by company;
var count;
ranks countrank;
run;
proc sort data=result;
by company countrank;
run;