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

What are the number of the first names of all students in Smith Hall?, and sort by the how many fname in asc.
SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' GROUP BY Fname ORDER BY COUNT(Fname)
SELECT "Fname", COUNT("Fname") FROM "Student" AS "T1" JOIN "Lives_in" AS "T2" ON "T1"."stuid" = "T2"."stuid" JOIN "Dorm" AS "T3" ON "T2"."dormid" = "T3"."dormid" AND "T3"."dorm_name" = 'Smith Hall' GROUP BY "Fname" ORDER BY COUNT("Fname") NULLS FIRST