CREATE TABLE course (crs_code CLOB, dept_code CLOB, crs_description CLOB, crs_credit NUMBER)
CREATE TABLE enroll (class_code CLOB, stu_num NUMBER, enroll_grade CLOB)
CREATE TABLE employee (emp_num NUMBER, emp_lname CLOB, emp_fname CLOB, emp_initial CLOB, emp_jobcode CLOB, emp_hiredate TIME, emp_dob TIME)
CREATE TABLE professor (emp_num NUMBER, dept_code CLOB, prof_office CLOB, prof_extension CLOB, prof_high_degree CLOB)
CREATE TABLE class (class_code CLOB, crs_code CLOB, class_section CLOB, class_time CLOB, class_room CLOB, prof_num NUMBER)
CREATE TABLE department (dept_code CLOB, dept_name CLOB, school_code CLOB, emp_num NUMBER, dept_address CLOB, dept_extension CLOB)
CREATE TABLE student (stu_num NUMBER, stu_lname CLOB, stu_fname CLOB, stu_init CLOB, stu_dob TIME, stu_hrs NUMBER, stu_class CLOB, stu_gpa NUMBER, stu_transfer NUMBER, dept_code CLOB, stu_phone CLOB, prof_num NUMBER)

How many classes are held in each department?
SELECT COUNT(*), dept_code FROM class AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code
SELECT COUNT(*), "dept_code" FROM "class" "T1" JOIN "course" "T2" ON "T1"."crs_code" = "T2"."crs_code" GROUP BY "dept_code"