CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)

Which least difficult ULCS course has the largest class size ?
SELECT DISTINCT department, name, number FROM course WHERE course_id IN (SELECT PROGRAM_COURSE_ID FROM program_course AS PROGRAM_COURSE WHERE PROGRAM_WORKLOAD = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%ULCS%')) AND num_enrolled = (SELECT MAX(COURSEalias1.num_enrolled) FROM course AS COURSEalias1 WHERE COURSEalias1.course_id IN (SELECT PROGRAM_COURSEalias2.course_id FROM program_course AS PROGRAM_COURSEalias2 WHERE PROGRAM_COURSEalias2.workload = (SELECT MIN(PROGRAM_COURSEalias3.workload) FROM program_course AS PROGRAM_COURSEalias3 WHERE PROGRAM_COURSEalias3.category = 'ULCS')))
WITH "_u_0" AS (SELECT MIN("PROGRAM_COURSEalias1"."workload") FROM "program_course" "PROGRAM_COURSEalias1" WHERE "PROGRAM_COURSEalias1"."category" LIKE '%ULCS%' HAVING "PROGRAM_WORKLOAD" = MIN("PROGRAM_COURSEalias1"."workload")), "_u_2" AS (SELECT MIN("PROGRAM_COURSEalias3"."workload") FROM "program_course" "PROGRAM_COURSEalias3" WHERE "PROGRAM_COURSEalias3"."category" = 'ULCS'), "_u_3" AS (SELECT "PROGRAM_COURSEalias2"."course_id" FROM "program_course" "PROGRAM_COURSEalias2" JOIN "_u_2" "_u_2" ON "PROGRAM_COURSEalias2"."workload" = "_u_2"."" GROUP BY "course_id"), "_u_4" AS (SELECT MAX("COURSEalias1"."num_enrolled") FROM "course" "COURSEalias1" LEFT JOIN "_u_3" "_u_3" ON "COURSEalias1"."course_id" = "_u_3"."" WHERE NOT "_u_3"."" IS NULL HAVING "num_enrolled" = MAX("COURSEalias1"."num_enrolled")) SELECT DISTINCT "department", "name", "number" FROM "course" CROSS JOIN "_u_4" "_u_4" WHERE "course_id" IN (SELECT "PROGRAM_COURSE_ID" FROM "program_course" "PROGRAM_COURSE" CROSS JOIN "_u_0" "_u_0")