SELECT "account_dim"."id" AS "id", "account_dim"."canvas_id" AS "canvas_id", CAST("account_dim"."name" AS TEXT) AS "name", "account_dim"."depth" AS "depth", CAST("account_dim"."workflow_state" AS TEXT) AS "workflow_state", CAST("account_dim"."parent_account" AS TEXT) AS "parent_account", "account_dim"."parent_account_id" AS "parent_account_id", CAST("account_dim"."grandparent_account" AS TEXT) AS "grandparent_account", "account_dim"."grandparent_account_id" AS "grandparent_account_id", CAST("account_dim"."root_account" AS TEXT) AS "root_account", "account_dim"."root_account_id" AS "root_account_id", CAST("account_dim"."subaccount1" AS TEXT) AS "subaccount1", "account_dim"."subaccount1_id" AS "subaccount1_id", CAST("account_dim"."subaccount2" AS TEXT) AS "subaccount2", "account_dim"."subaccount2_id" AS "subaccount2_id", CAST("account_dim"."subaccount3" AS TEXT) AS "subaccount3", "account_dim"."subaccount3_id" AS "subaccount3_id", CAST("account_dim"."subaccount4" AS TEXT) AS "subaccount4", "account_dim"."subaccount4_id" AS "subaccount4_id", CAST("account_dim"."subaccount5" AS TEXT) AS "subaccount5", "account_dim"."subaccount5_id" AS "subaccount5_id", CAST("account_dim"."subaccount6" AS TEXT) AS "subaccount6", "account_dim"."subaccount6_id" AS "subaccount6_id", CAST("account_dim"."subaccount7" AS TEXT) AS "subaccount7", "account_dim"."subaccount7_id" AS "subaccount7_id", CAST("account_dim"."subaccount8" AS TEXT) AS "subaccount8", "account_dim"."subaccount8_id" AS "subaccount8_id", CAST("account_dim"."subaccount9" AS TEXT) AS "subaccount9", "account_dim"."subaccount9_id" AS "subaccount9_id", CAST("account_dim"."subaccount10" AS TEXT) AS "subaccount10", "account_dim"."subaccount10_id" AS "subaccount10_id", CAST("account_dim"."subaccount11" AS TEXT) AS "subaccount11", "account_dim"."subaccount11_id" AS "subaccount11_id", CAST("account_dim"."subaccount12" AS TEXT) AS "subaccount12", "account_dim"."subaccount12_id" AS "subaccount12_id", CAST("account_dim"."subaccount13" AS TEXT) AS "subaccount13", "account_dim"."subaccount13_id" AS "subaccount13_id", CAST("account_dim"."subaccount14" AS TEXT) AS "subaccount14", "account_dim"."subaccount14_id" AS "subaccount14_id", CAST("account_dim"."subaccount15" AS TEXT) AS "subaccount15", "account_dim"."subaccount15_id" AS "subaccount15_id", CAST("account_dim"."sis_source_id" AS TEXT) AS "sis_source_id", "course_dim"."id" AS "id (course_dim)", "course_dim"."canvas_id" AS "canvas_id (course_dim)", "course_dim"."root_account_id" AS "root_account_id (course_dim)", "course_dim"."account_id" AS "account_id", "course_dim"."enrollment_term_id" AS "enrollment_term_id", CAST("course_dim"."name" AS TEXT) AS "name (course_dim)", CAST("course_dim"."code" AS TEXT) AS "code", CAST("course_dim"."type" AS TEXT) AS "type", "course_dim"."created_at" AS "created_at", "course_dim"."start_at" AS "start_at", "course_dim"."conclude_at" AS "conclude_at", "course_dim"."publicly_visible" AS "publicly_visible", CAST("course_dim"."sis_source_id" AS TEXT) AS "sis_source_id (course_dim)", CAST("course_dim"."workflow_state" AS TEXT) AS "workflow_state (course_dim)", "course_dim"."wiki_id" AS "wiki_id", CAST("course_dim"."syllabus_body" AS TEXT) AS "syllabus_body", "course_section_dim"."id" AS "id (course_section_dim)", "course_section_dim"."canvas_id" AS "canvas_id (course_section_dim)", CAST("course_section_dim"."name" AS TEXT) AS "name (course_section_dim)", "course_section_dim"."course_id" AS "course_id", "course_section_dim"."enrollment_term_id" AS "enrollment_term_id (course_section_dim)", "course_section_dim"."default_section" AS "default_section", "course_section_dim"."accepting_enrollments" AS "accepting_enrollments", "course_section_dim"."can_manually_enroll" AS "can_manually_enroll", "course_section_dim"."start_at" AS "start_at (course_section_dim)", "course_section_dim"."end_at" AS "end_at", "course_section_dim"."created_at" AS "created_at (course_section_dim)", "course_section_dim"."updated_at" AS "updated_at (course_section_dim)", CAST("course_section_dim"."workflow_state" AS TEXT) AS "workflow_state (course_section_dim)", "course_section_dim"."restrict_enrollments_to_section_dates" AS "restrict_enrollments_to_section_dates", "course_section_dim"."nonxlist_course_id" AS "nonxlist_course_id", CAST("course_section_dim"."sis_source_id" AS TEXT) AS "sis_source_id (course_section_dim)", "teacher_enrollment_dim"."id" AS "id (enrollment_dim)", "teacher_enrollment_dim"."canvas_id" AS "canvas_id (enrollment_dim)", "teacher_enrollment_dim"."root_account_id" AS "root_account_id (enrollment_dim)", "teacher_enrollment_dim"."course_section_id" AS "course_section_id", "teacher_enrollment_dim"."role_id" AS "role_id", CAST("teacher_enrollment_dim"."type" AS TEXT) AS "type (enrollment_dim)", CAST("teacher_enrollment_dim"."workflow_state" AS TEXT) AS "workflow_state (enrollment_dim)", "teacher_enrollment_dim"."created_at" AS "created_at (enrollment_dim)", "teacher_enrollment_dim"."updated_at" AS "updated_at", "teacher_enrollment_dim"."start_at" AS "start_at (enrollment_dim)", "teacher_enrollment_dim"."end_at" AS "end_at (enrollment_dim)", "teacher_enrollment_dim"."completed_at" AS "completed_at", "teacher_enrollment_dim"."self_enrolled" AS "self_enrolled", CAST("teacher_enrollment_dim"."sis_source_id" AS TEXT) AS "sis_source_id (enrollment_dim)", "teacher_enrollment_dim"."course_id" AS "course_id (enrollment_dim)", "teacher_enrollment_dim"."user_id" AS "user_id", "teacher_enrollment_dim"."last_activity_at" AS "last_activity_at", "user_dim"."id" AS "id (user_dim)", "user_dim"."canvas_id" AS "canvas_id (user_dim)", "user_dim"."root_account_id" AS "root_account_id (user_dim)", CAST("user_dim"."name" AS TEXT) AS "name (user_dim)", CAST("user_dim"."time_zone" AS TEXT) AS "time_zone", "user_dim"."created_at" AS "created_at (user_dim)", CAST("user_dim"."visibility" AS TEXT) AS "visibility", CAST("user_dim"."school_name" AS TEXT) AS "school_name", CAST("user_dim"."school_position" AS TEXT) AS "school_position", CAST("user_dim"."gender" AS TEXT) AS "gender", CAST("user_dim"."locale" AS TEXT) AS "locale", CAST("user_dim"."public" AS TEXT) AS "public", "user_dim"."birthdate" AS "birthdate", CAST("user_dim"."country_code" AS TEXT) AS "country_code", CAST("user_dim"."workflow_state" AS TEXT) AS "workflow_state (user_dim)", CAST("user_dim"."sortable_name" AS TEXT) AS "sortable_name", CAST("user_dim"."global_canvas_id" AS TEXT) AS "global_canvas_id" FROM "public"."account_dim" "account_dim" INNER JOIN "public"."course_dim" "course_dim" ON ("account_dim"."id" = "course_dim"."account_id") INNER JOIN "public"."course_section_dim" "course_section_dim" ON ("course_dim"."id" = "course_section_dim"."course_id") INNER JOIN "public"."enrollment_dim" "teacher_enrollment_dim" ON ("course_dim"."id" = "teacher_enrollment_dim"."course_id") INNER JOIN "public"."user_dim" "user_dim" ON ("teacher_enrollment_dim"."user_id" = "user_dim"."id")