CREATE TABLE Activity (actid NUMBER, activity_name VARCHAR2)
CREATE TABLE Student (StuID NUMBER, LName VARCHAR2, Fname VARCHAR2, Age NUMBER, Sex VARCHAR2, Major NUMBER, Advisor NUMBER, city_code VARCHAR2)
CREATE TABLE Faculty (FacID NUMBER, Lname VARCHAR2, Fname VARCHAR2, Rank VARCHAR2, Sex VARCHAR2, Phone NUMBER, Room VARCHAR2, Building VARCHAR2)
CREATE TABLE Faculty_Participates_in (FacID NUMBER, actid NUMBER)
CREATE TABLE Participates_in (stuid NUMBER, actid NUMBER)

Stacked bar chart of the total number for with each Sex in each rank, I want to show in desc by the the total number .
SELECT Rank, COUNT(*) FROM Faculty GROUP BY Sex, Rank ORDER BY COUNT(*) DESC
SELECT "Rank", COUNT(*) FROM "Faculty" GROUP BY "Sex", "Rank" ORDER BY COUNT(*) DESC