CREATE TABLE classroom (building TEXT, room_number TEXT, capacity DECIMAL)
CREATE TABLE student (id TEXT, name TEXT, dept_name TEXT, tot_cred DECIMAL)
CREATE TABLE teaches (id TEXT, course_id TEXT, sec_id TEXT, semester TEXT, year DECIMAL)
CREATE TABLE takes (id TEXT, course_id TEXT, sec_id TEXT, semester TEXT, year DECIMAL, grade TEXT)
CREATE TABLE instructor (id TEXT, name TEXT, dept_name TEXT, salary DECIMAL)
CREATE TABLE section (course_id TEXT, sec_id TEXT, semester TEXT, year DECIMAL, building TEXT, room_number TEXT, time_slot_id TEXT)
CREATE TABLE advisor (s_id TEXT, i_id TEXT)
CREATE TABLE course (course_id TEXT, title TEXT, dept_name TEXT, credits DECIMAL)
CREATE TABLE time_slot (time_slot_id TEXT, day TEXT, start_hr DECIMAL, start_min DECIMAL, end_hr DECIMAL, end_min DECIMAL)
CREATE TABLE department (dept_name TEXT, building TEXT, budget DECIMAL)
CREATE TABLE prereq (course_id TEXT, prereq_id TEXT)

Find the total number of students and total number of instructors for each department.
SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name
SELECT COUNT(DISTINCT "T2"."id"), COUNT(DISTINCT "T3"."id"), "T3"."dept_name" FROM "department" AS "T1" JOIN "student" AS "T2" ON "T1"."dept_name" = "T2"."dept_name" JOIN "instructor" AS "T3" ON "T1"."dept_name" = "T3"."dept_name" GROUP BY "T3"."dept_name"