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
Hello, what are the names of the faculty members who don't participate in any activity?
assistant
SELECT Lname , Fname FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in;
human
Which faculty members participate in activities?
assistant
SELECT T2.Lname , T2.Fname FROM Faculty_Participates_in AS T1 JOIN Faculty AS T2 ON T1.Facid = T2.Facid;
human
What activities do Michael Goodrich and Gerald Masson participate in?
assistant
SELECT actid FROM Faculty_Participates_in AS T1 JOIN Faculty AS T2 ON T1.Facid = T2.Facid WHERE T2.Lname = 'Goodrich' AND T2.Fname = 'Michael' UNION SELECT actid FROM Faculty_Participates_in AS T1 JOIN Faculty AS T2 ON T1.Facid = T2.Facid WHERE T2.Lname = 'Masson' AND T2.Fname = 'Gerald';
human
In total, how many faculty members are there?
assistant
SELECT COUNT( * ) FROM faculty ;