human
Schema:
Activity (actid, activity_name)
Participates_in (stuid, actid)
Faculty_Participates_in (FacID, actid)
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Faculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the building for all Faculty.
assistant
SELECT building FROM Faculty;
human
How about those for professors?
assistant
SELECT building FROM Faculty WHERE rank = 'Professor';
human
For each of the buildings, show the number of professors.
assistant
SELECT building , COUNT( * ) FROM Faculty WHERE rank = "Professor" GROUP BY building ;