human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Faculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)
Department (DNO, Division, DName, Room, Building, DPhone)
Member_of (FacID, DNO, Appt_Type)
Course (CID, CName, Credits, Instructor, Days, Hours, DNO)
Minor_in (StuID, DNO)
Enrolled_in (StuID, CID, Grade)
Gradeconversion (lettergrade, gradepoint)
Please answer with SQL.
assistant
Sure, I understand.
human
How many faculty members are in building Barton?
assistant
SELECT COUNT( * ) FROM FACULTY WHERE Building = 'Barton';
human
Please list the faculty members in building Barton.
assistant
SELECT * FROM FACULTY WHERE Building = 'Barton';
human
Can you please get just their last names?
assistant
SELECT lname FROM FACULTY WHERE Building = 'Barton';
human
Of the faculty members in building Barton, how many are in each rank?
assistant
SELECT rank , COUNT( * ) FROM FACULTY WHERE Building = 'Barton' GROUP by rank;
human
Can you please list the last names of the faculty in Barton one more time, in alphabetical order?
assistant
SELECT Lname FROM FACULTY WHERE Building = "Barton" ORDER BY Lname ;