CREATE TABLE Dorm (dormid INT, dorm_name VARCHAR, student_capacity INT, gender VARCHAR)
CREATE TABLE Lives_in (stuid INT, dormid INT, room_number INT)
CREATE TABLE Dorm_amenity (amenid INT, amenity_name VARCHAR)
CREATE TABLE Student (StuID INT, LName VARCHAR, Fname VARCHAR, Age INT, Sex VARCHAR, Major INT, Advisor INT, city_code VARCHAR)
CREATE TABLE Has_amenity (dormid INT, amenid INT)

What is the average age for each gender of student? Return a bar chart, and order by the total number in descending.
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY AVG(Age) DESC
SELECT "Sex", AVG("Age") FROM "Student" GROUP BY "Sex" ORDER BY AVG("Age") DESC NULLS LAST