Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) )
TABLE: CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) )
TABLE: CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER )
TABLE: CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER )
TABLE: CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) )

### Question ###
Show all the faculty ranks and the number of students advised by each rank in a bar chart, list from low to high by the Y-axis.

### Accurate SQL ###

SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY COUNT(*)