Show all the faculty ranks
select rank from faculty
For each of those ranks, show the number of students advised.
select t1.rank, count(*) from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.rank