Show the ids of all the faculty members who participate in an activity and advise a student.
CREATE TABLE Student (FacID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty_participates_in (FacID VARCHAR, advisor VARCHAR)
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Student (FacID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty_participates_in (FacID VARCHAR, advisor VARCHAR) Question: Show the ids of all the faculty members who participate in an activity and advise a student. [/INST] SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student </s>