CREATE TABLE Faculty (rank VARCHAR2, FacID VARCHAR2)
CREATE TABLE Student (advisor VARCHAR2)

Show all the faculty ranks and the number of students advised by each rank.
SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank
SELECT "T1"."rank", COUNT(*) FROM "Faculty" "T1" JOIN "Student" "T2" ON "T1"."FacID" = "T2"."advisor" GROUP BY "T1"."rank"