Find the title, credit, and department name of courses that have more than one prerequisites?
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, dept_name VARCHAR, course_id VARCHAR)
SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, dept_name VARCHAR, course_id VARCHAR) Question: Find the title, credit, and department name of courses that have more than one prerequisites? [/INST] SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1 </s>