Translate the following question to SQL: Find the total number of students in each department.

Schema: CREATE TABLE classroom (
    building varchar(15)   PRIMARY KEY,
    room_number varchar(7)   PRIMARY KEY,
    capacity numeric(4,0),
    PRIMARY KEY (building, room_number),
    UNIQUE (building, room_number)
);

CREATE TABLE department (
    dept_name varchar(20)   PRIMARY KEY,
    building varchar(15),
    budget numeric(12,2),
    UNIQUE (dept_name),
    budget		        numeric(12,2) check (budget > 0),
);

CREATE TABLE course (
    course_id varchar(8)   PRIMARY KEY,
    title varchar(50),
    dept_name varchar(20),
    credits numeric(2,0),
    UNIQUE (course_id),
    FOREIGN KEY (dept_name) REFERENCES department(dept_name),
    credits		numeric(2,0) check (credits > 0),
);

CREATE TABLE instructor (
    ID varchar(5)   PRIMARY KEY,
    name varchar(20) NOT NULL,
    dept_name varchar(20),
    salary numeric(8,2),
    UNIQUE (ID),
    FOREIGN KEY (dept_name) REFERENCES department(dept_name),
    salary			numeric(8,2) check (salary > 29000),
);

CREATE TABLE section (
    course_id varchar(8)   PRIMARY KEY,
    sec_id varchar(8)   PRIMARY KEY,
    semester varchar(6)   PRIMARY KEY,
    year numeric(4,0)   PRIMARY KEY,
    building varchar(15),
    room_number varchar(7),
    time_slot_id varchar(4),
    PRIMARY KEY (course_id, sec_id, semester, year),
    UNIQUE (course_id, sec_id, semester, year),
    FOREIGN KEY (building) REFERENCES classroom(building),
    FOREIGN KEY (room_number) REFERENCES classroom(room_number),
    FOREIGN KEY (course_id) REFERENCES course(course_id),
    check (semester in ('Fall', 'Winter', 'Spring', 'Summer')),,
    year			numeric(4,0) check (year > 1701 and year < 2100),
);

CREATE TABLE teaches (
    ID varchar(5)   PRIMARY KEY,
    course_id varchar(8)   PRIMARY KEY,
    sec_id varchar(8)   PRIMARY KEY,
    semester varchar(6)   PRIMARY KEY,
    year numeric(4,0)   PRIMARY KEY,
    PRIMARY KEY (ID, course_id, sec_id, semester, year),
    UNIQUE (ID, course_id, sec_id, semester, year),
    FOREIGN KEY (ID) REFERENCES instructor(ID),
    FOREIGN KEY (course_id) REFERENCES section(course_id),
    FOREIGN KEY (sec_id) REFERENCES section(sec_id),
    FOREIGN KEY (semester) REFERENCES section(semester),
    FOREIGN KEY (year) REFERENCES section(year)
);

CREATE TABLE student (
    ID varchar(5)   PRIMARY KEY,
    name varchar(20) NOT NULL,
    dept_name varchar(20),
    tot_cred numeric(3,0),
    UNIQUE (ID),
    FOREIGN KEY (dept_name) REFERENCES department(dept_name),
    tot_cred		numeric(3,0) check (tot_cred >= 0),
);

CREATE TABLE takes (
    ID varchar(5)   PRIMARY KEY,
    course_id varchar(8)   PRIMARY KEY,
    sec_id varchar(8)   PRIMARY KEY,
    semester varchar(6)   PRIMARY KEY,
    year numeric(4,0)   PRIMARY KEY,
    grade varchar(2),
    PRIMARY KEY (ID, course_id, sec_id, semester, year),
    UNIQUE (ID, course_id, sec_id, semester, year),
    FOREIGN KEY (ID) REFERENCES student(ID),
    FOREIGN KEY (course_id) REFERENCES section(course_id),
    FOREIGN KEY (sec_id) REFERENCES section(sec_id),
    FOREIGN KEY (semester) REFERENCES section(semester),
    FOREIGN KEY (year) REFERENCES section(year)
);

CREATE TABLE advisor (
    s_ID varchar(5)   PRIMARY KEY,
    i_ID varchar(5),
    UNIQUE (s_ID),
    FOREIGN KEY (s_ID) REFERENCES student(ID),
    FOREIGN KEY (i_ID) REFERENCES instructor(ID)
);

CREATE TABLE time_slot (
    time_slot_id varchar(4)   PRIMARY KEY,
    day varchar(1)   PRIMARY KEY,
    start_hr numeric(2)   PRIMARY KEY,
    start_min numeric(2)   PRIMARY KEY,
    end_hr numeric(2),
    end_min numeric(2),
    PRIMARY KEY (time_slot_id, day, start_hr, start_min),
    UNIQUE (time_slot_id, day, start_hr, start_min),
    start_hr		numeric(2) check (start_hr >= 0 and start_hr < 24),,
    start_min		numeric(2) check (start_min >= 0 and start_min < 60),,
    end_hr			numeric(2) check (end_hr >= 0 and end_hr < 24),,
    end_min		numeric(2) check (end_min >= 0 and end_min < 60),
);

CREATE TABLE prereq (
    course_id varchar(8)   PRIMARY KEY,
    prereq_id varchar(8)   PRIMARY KEY,
    PRIMARY KEY (course_id, prereq_id),
    UNIQUE (course_id, prereq_id),
    FOREIGN KEY (prereq_id) REFERENCES course(course_id),
    FOREIGN KEY (course_id) REFERENCES course(course_id)
);
user
SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
assistant