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

Count the number of departments which offer courses.
SELECT COUNT(DISTINCT dept_name) FROM course
SELECT COUNT(DISTINCT "dept_name") FROM "course"