BEAVER: An Enterprise Benchmark for Text-to-SQL
Paper • 2409.02038 • Published
query_id int64 0 208 | database_id stringclasses 6
values | table_id listlengths 1 12 | query stringlengths 45 952 | answer stringlengths 154 11.4k | difficulty stringclasses 1
value | mapping listlengths 0 13 | join_key listlengths 0 13 |
|---|---|---|---|---|---|---|---|
0 | dw | [
"FCLT_BUILDING_ADDRESS",
"FCLT_ROOMS",
"FCLT_ORG_DLC_KEY",
"MASTER_DEPT_HIERARCHY",
"BUILDINGS"
] | What is the current building key, building street address, city, state, and postal code of the history department? | SELECT DISTINCT d.FCLT_BUILDING_KEY, e.BUILDING_STREET_ADDRESS, d.CITY, d.STATE, d.POSTAL_CODE FROM FCLT_BUILDING_ADDRESS d JOIN FCLT_ROOMS a ON a.FCLT_BUILDING_KEY = d.FCLT_BUILDING_KEY JOIN FCLT_ORG_DLC_KEY b ON a.FCLT_ORGANIZATION_KEY = b.FCLT_ORGANIZATION_KEY JOIN MASTER_DEPT_HIERARCHY c ON b.DLC_KEY = c.DLC_KEY JO... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY"
],
"nl_phrase": "building key"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_STREET_ADDRESS",
"FCLT_BUILDING_ADDRESS.ADDRESS_PURPOSE"
],
"nl_phrase": "building street address"
},
{
"mapped_column": [
... | [
[
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY",
"FCLT_ROOMS.FCLT_BUILDING_KEY"
],
[
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY",
"FCLT_ORG_DLC_KEY.FCLT_ORGANIZATION_KEY"
],
[
"FCLT_ORG_DLC_KEY.DLC_KEY",
"MASTER_DEPT_HIERARCHY.DLC_KEY"
],
[
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY",
"... |
1 | dw | [
"IAP_SUBJECT_DETAIL",
"IAP_SUBJECT_PERSON",
"ACADEMIC_TERMS_ALL",
"IAP_SUBJECT_SESSION"
] | Show the unique activity titles, locations, term start date, and supervisor name for all independent activities, sorted by the ascending order of start date. | SELECT DISTINCT a.activity_title, d.session_location, c.term_start_date, b.person_name AS Leader FROM iap_subject_detail a JOIN iap_subject_person b ON a.iap_subject_person_key = b.iap_subject_person_key JOIN academic_terms_all c ON c.term_code = a.term_code JOIN iap_subject_session d ON a.iap_subject_session_key = d.i... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.ACTIVITY_TITLE"
],
"nl_phrase": "activity titles"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.SESSION_LOCATION"
],
"nl_phrase": "locations"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_START_DATE"
],
"nl_phra... | [
[
"IAP_SUBJECT_PERSON.IAP_SUBJECT_PERSON_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_PERSON_KEY"
],
[
"ACADEMIC_TERMS_ALL.TERM_CODE",
"IAP_SUBJECT_DETAIL.TERM_CODE"
],
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
]
] |
2 | dw | [
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_SUBJECT_OFFERED",
"LIBRARY_RESERVE_CATALOG"
] | List the unique course instructor names, course titles, and the amount of material for each course instructor key and the key of subject offered. | SELECT DISTINCT LIBRARY_COURSE_INSTRUCTOR.instructor_name, LIBRARY_SUBJECT_OFFERED.subject_title, COUNT(LIBRARY_RESERVE_CATALOG.catalog_isbn) OVER (PARTITION BY LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY, LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_OFFERED_KEY) FROM LIBRARY_COURSE_INSTRUCTOR JOIN LIBRARY_RESER... | N/A | [
{
"mapped_column": [
"LIBRARY_COURSE_INSTRUCTOR.INSTRUCTOR_NAME"
],
"nl_phrase": "course instructor names"
},
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "course titles"
},
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_IS... | [
[
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_COURSE_INSTRUCTOR_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OFFERED_KEY",
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_OFFERED_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESE... |
3 | dw | [
"EMPLOYEE_DIRECTORY",
"FAC_ROOMS",
"FAC_BUILDING_ADDRESS",
"BUILDINGS"
] | What is the room, floor, building key, building street address, city, state, and postal code of Professor Summer Haynes's office? | SELECT DISTINCT fac_rooms.Room, fac_rooms.floor, fac_building_address.BUILDING_KEY, BUILDINGS.BUILDING_STREET_ADDRESS, fac_building_address.CITY, fac_building_address.STATE, fac_building_address.POSTAL_CODE FROM (SELECT office_location FROM employee_directory WHERE full_name = 'Haynes, Summer') AS emp_office JOIN fac_r... | N/A | [
{
"mapped_column": [
"FAC_ROOMS.ROOM"
],
"nl_phrase": "room"
},
{
"mapped_column": [
"FAC_ROOMS.FLOOR"
],
"nl_phrase": "floor"
},
{
"mapped_column": [
"FAC_BUILDING_ADDRESS.BUILDING_KEY"
],
"nl_phrase": "building key"
},
{
"mapped_column": [
... | [
[
"EMPLOYEE_DIRECTORY.OFFICE_LOCATION",
"FAC_ROOMS.FAC_ROOM_KEY"
],
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
],
[
"BUILDINGS.BUILDING_KEY",
"FAC_BUILDING_ADDRESS.BUILDING_KEY"
]
] |
4 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"FCLT_ROOMS",
"FCLT_BUILDING_ADDRESS",
"FCLT_BUILDING",
"BUILDINGS"
] | List the unique full room names, their corresponding building names, street addresses, cities, states, postal codes, and building heights for rooms associated with subjects that Computer Science students can enroll in. | SELECT DISTINCT fr.ROOM_FULL_NAME, b.BUILDING_NAME, b.BUILDING_STREET_ADDRESS, fba.CITY, fba.STATE, fba.POSTAL_CODE, fb.BUILDING_HEIGHT FROM COURSE_CATALOG_SUBJECT_OFFERED JOIN FCLT_ROOMS fr ON MEET_PLACE = FCLT_ROOM_KEY JOIN FCLT_BUILDING_ADDRESS fba ON fba.FCLT_BUILDING_KEY = fr.FCLT_BUILDING_KEY JOIN FCLT_BUILDING f... | N/A | [
{
"mapped_column": [
"FCLT_ROOMS.ROOM_FULL_NAME"
],
"nl_phrase": "full room names"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_STREET_ADDRESS",
"FCLT_BUILDING_ADDRESS.ADDRES... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.MEET_PLACE",
"FCLT_ROOMS.FCLT_ROOM_KEY"
],
[
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY",
"FCLT_ROOMS.FCLT_BUILDING_KEY"
],
[
"FCLT_BUILDING.FCLT_BUILDING_KEY",
"FCLT_ROOMS.FCLT_BUILDING_KEY"
],
[
"BUILDINGS.BUILDING_KEY",
"FCLT_ROOMS.FCLT_... |
5 | dw | [
"SUBJECT_OFFERED",
"FCLT_ROOMS",
"FCLT_BUILDING_ADDRESS",
"BUILDINGS"
] | List the unique term code, subject title, room, floor, building key, building street address, city, state, and postal code, formats, and number of enrolled students for all courses with more than 300 attendees. | SELECT DISTINCT s.TERM_CODE, s.subject_title, fr.room, fr.floor, b.BUILDING_KEY, b.BUILDING_STREET_ADDRESS, fba.CITY, fba.STATE, fba.POSTAL_CODE, s.form_type, s.num_enrolled_students FROM subject_offered s JOIN FCLT_ROOMS fr ON MEET_PLACE = FCLT_ROOM_KEY JOIN FCLT_BUILDING_ADDRESS fba ON fba.FCLT_BUILDING_KEY = fr.FCLT... | N/A | [
{
"mapped_column": [
"SUBJECT_OFFERED.TERM_CODE"
],
"nl_phrase": "term code"
},
{
"mapped_column": [
"SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "subject title"
},
{
"mapped_column": [
"FCLT_ROOMS.ROOM"
],
"nl_phrase": "room"
},
{
"mapped_col... | [
[
"FCLT_ROOMS.FCLT_ROOM_KEY",
"SUBJECT_OFFERED.MEET_PLACE"
],
[
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY",
"FCLT_ROOMS.FCLT_BUILDING_KEY"
],
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"BUILDINGS.BUILDING_KEY"
]
] |
6 | dw | [
"TIP_MATERIAL",
"TIP_DETAIL",
"TIP_SUBJECT_OFFERED"
] | What are the subject titles, their material titles, ISBN numbers, new shelf prices, and total costs of new materials for each subject title, sorted by individual item prices in ascending order? | SELECT DISTINCT tso.SUBJECT_TITLE, tm.title, tm.isbn, tm.new_shelf_price, SUM(tm.new_shelf_price) OVER(PARTITION BY tso.SUBJECT_TITLE) FROM tip_material tm JOIN TIP_DETAIL td ON tm.TIP_MATERIAL_KEY = td.TIP_MATERIAL_KEY JOIN TIP_SUBJECT_OFFERED tso ON tso.SUBJECT_ID = td.SUBJECT_ID ORDER BY tm.new_shelf_price ASC; | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "subject titles"
},
{
"mapped_column": [
"TIP_MATERIAL.TITLE"
],
"nl_phrase": "material titles"
},
{
"mapped_column": [
"TIP_MATERIAL.ISBN"
],
"nl_phrase": "ISBN numbers"
},
{
... | [
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
[
"TIP_SUBJECT_OFFERED.SUBJECT_ID",
"TIP_DETAIL.SUBJECT_ID"
]
] |
7 | dw | [
"FCLT_BUILDING_HIST",
"FCLT_ROOMS",
"EMPLOYEE_DIRECTORY"
] | List the long names of buildings constructed before 1950 that have more than 100 employees, the built year of the building, and number of employees. | SELECT * FROM (SELECT DISTINCT a.BUILDING_NAME_LONG, a.year_built, COUNT(employee_directory.MIT_ID) OVER (PARTITION BY a.BUILDING_NAME_LONG, a.year_built) AS num_employees FROM (SELECT * FROM (SELECT DISTINCT FCLT_BUILDING_KEY, BUILDING_NAME_LONG, EXTRACT(YEAR FROM STR_TO_DATE(date_built, '%m/%d/%Y')) AS year_built FRO... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING_HIST.BUILDING_NAME_LONG"
],
"nl_phrase": "long names of buildings"
},
{
"mapped_column": [
"FCLT_BUILDING_HIST.DATE_BUILT"
],
"nl_phrase": "built year"
},
{
"mapped_column": [
"EMPLOYEE_DIRECTORY.MIT_ID"
],
"nl_phrase"... | [
[
"EMPLOYEE_DIRECTORY.OFFICE_LOCATION",
"FCLT_ROOMS.BUILDING_ROOM"
]
] |
8 | dw | [
"CIS_COURSE_CATALOG",
"COURSE_CATALOG_SUBJECT_OFFERED",
"FCLT_ROOMS",
"FCLT_BUILDING"
] | For each building key, what is the building name and the number of courses offered by the Center for International Studies? | SELECT fb.BUILDING_NAME, COUNT(DISTINCT ccc.subject_id) FROM cis_course_catalog ccc JOIN COURSE_CATALOG_SUBJECT_OFFERED ccso ON ccc.SUBJECT_ID = ccso.SUBJECT_ID JOIN FCLT_ROOMS fr ON ccso.MEET_PLACE = fr.FCLT_ROOM_KEY JOIN FCLT_BUILDING fb ON fb.FCLT_BUILDING_KEY = fr.FCLT_BUILDING_KEY GROUP BY fb.FCLT_BUILDING_KEY, fb... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING.FCLT_BUILDING_KEY"
],
"nl_phrase": "building key"
},
{
"mapped_column": [
"FCLT_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building name"
},
{
"mapped_column": [
"CIS_COURSE_CATALOG.SUBJECT_ID"
],
"nl_phrase": "courses o... | [
[
"CIS_COURSE_CATALOG.SUBJECT_ID",
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_ID"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.MEET_PLACE",
"FCLT_ROOMS.FCLT_ROOM_KEY"
],
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"FCLT_BUILDING.FCLT_BUILDING_KEY"
]
] |
9 | dw | [
"FCLT_ROOMS",
"MIT_STUDENT_DIRECTORY",
"FCLT_BUILDING"
] | What is the name of the building that accomodates the most students, and how many students does it accomodate? | SELECT DISTINCT building_name, num_students FROM (SELECT fclt_building_key, COUNT(DISTINCT full_name) AS num_students FROM fclt_rooms JOIN mit_student_directory ON office_location = BUILDING_ROOM GROUP BY fclt_building_key) AS a JOIN fclt_building ON a.fclt_building_key = fclt_building.fclt_building_key JOIN (SELECT MA... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING.BUILDING_NAME"
],
"nl_phrase": "name of the building"
},
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
"nl_phrase": "students"
}
] | [
[
"FCLT_ROOMS.BUILDING_ROOM",
"MIT_STUDENT_DIRECTORY.OFFICE_LOCATION"
],
[
"FCLT_ROOMS.BUILDING_ROOM",
"MIT_STUDENT_DIRECTORY.OFFICE_LOCATION"
]
] |
10 | dw | [
"FAC_FLOOR",
"FAC_BUILDING"
] | List the name and floor of the building with the largest floor number. | SELECT DISTINCT B.BUILDING_NAME, A.FLOOR FROM FAC_FLOOR A JOIN FAC_BUILDING B ON A.BUILDING_KEY = B.FAC_BUILDING_KEY JOIN (SELECT MAX(f) AS highest_floor FROM (SELECT CASE WHEN FLOOR REGEXP '^[0-9]+$' THEN CAST(FLOOR AS UNSIGNED) ELSE NULL END AS f FROM FAC_FLOOR) AS subquery1) AS subquery2 ON (CASE WHEN A.FLOOR REGEXP... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"FAC_FLOOR.FLOOR"
],
"nl_phrase": "floor"
}
] | [
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_FLOOR.BUILDING_KEY"
]
] |
11 | dw | [
"IAP_SUBJECT_DETAIL",
"IAP_SUBJECT_CATEGORY",
"TIME_DAY"
] | For each IAP category and academic year, list the category name, academic year, total fee collected, total number of IAP subjects, and the minimum and maximum enrollment. | SELECT isc.IAP_CATEGORY_NAME, td.ACADEMIC_YEAR, SUM(isd.FEE) AS Total_Fee, COUNT(distinct isd.ACTIVITY_TITLE) AS Total_Subjects, MIN(isd.MAX_ENROLLMENT) AS Min_Attendance, MAX(isd.MAX_ENROLLMENT) AS Max_Attendance FROM IAP_SUBJECT_DETAIL isd JOIN IAP_SUBJECT_CATEGORY isc ON isd.IAP_SUBJECT_CATEGORY_KEY = isc.IAP_SUBJEC... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_CATEGORY.IAP_CATEGORY_NAME"
],
"nl_phrase": "category name"
},
{
"mapped_column": [
"TIME_DAY.ACADEMIC_YEAR"
],
"nl_phrase": "academic year"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.FEE"
],
"nl_phrase": "fee collected... | [
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_CATEGORY_KEY",
"IAP_SUBJECT_CATEGORY.IAP_SUBJECT_CATEGORY_KEY"
],
[
"TIME_DAY.ACADEMIC_TERM_CODE",
"IAP_SUBJECT_DETAIL.TERM_CODE"
]
] |
12 | dw | [
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_DETAIL",
"IAP_SUBJECT_SPONSOR"
] | For each sponsor of the independent activity periods, list the sponsor name, number of sessions held, the total number of enrollment, the minimum and maximum fee, the number of sessions with info, and the number of sessions without info. | SELECT issr.SPONSOR_NAME, COUNT(DISTINCT iss.IAP_SUBJECT_SESSION_KEY) AS Total_Sessions, SUM(isd.MAX_ENROLLMENT), MIN(isd.FEE) AS Min_Fee, MAX(isd.FEE) AS Max_Fee, SUM(CASE WHEN iss.HAS_SESSION_INFO = 'Y' THEN 1 ELSE 0 END) AS Num_Sessions_With_Info, SUM(CASE WHEN iss.HAS_SESSION_INFO = 'N' THEN 1 ELSE 0 END) AS Num_Se... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_SPONSOR.SPONSOR_NAME"
],
"nl_phrase": "sponsor name"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
"nl_phrase": "sessions"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.MAX_ENROLLMENT"
],
"nl_phr... | [
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
[
"IAP_SUBJECT_SPONSOR.IAP_SUBJECT_SPONSOR_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SPONSOR_KEY"
]
] |
13 | dw | [
"IAP_SUBJECT_PERSON",
"IAP_SUBJECT_DETAIL",
"TIME_DAY"
] | What are the individual's email and name, academic year, total number of IAP subjects, the minimum and maximum fees, and the total course enrollment for each individual and academic year? | SELECT isp.PERSON_EMAIL, isp.PERSON_NAME, td.ACADEMIC_YEAR, COUNT(distinct isd.ACTIVITY_TITLE) AS Total_Subjects, MIN(isd.FEE) AS Min_Fee, MAX(isd.FEE) AS Max_Fee, SUM(isd.MAX_ENROLLMENT) FROM IAP_SUBJECT_PERSON isp JOIN IAP_SUBJECT_DETAIL isd ON isp.IAP_SUBJECT_PERSON_KEY = isd.IAP_SUBJECT_PERSON_KEY JOIN TIME_DAY td ... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_PERSON.PERSON_EMAIL"
],
"nl_phrase": "email"
},
{
"mapped_column": [
"IAP_SUBJECT_PERSON.PERSON_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"TIME_DAY.ACADEMIC_YEAR"
],
"nl_phrase": "academic year"
},
{
"... | [
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_PERSON_KEY",
"IAP_SUBJECT_PERSON.IAP_SUBJECT_PERSON_KEY"
],
[
"TIME_DAY.ACADEMIC_TERM_CODE",
"IAP_SUBJECT_DETAIL.TERM_CODE"
]
] |
14 | dw | [
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_DETAIL",
"ACADEMIC_TERMS_ALL"
] | What is the term code, term description, total number of IAP sessions, total fee collected, and minimum and maximum enrollment for each term code? | SELECT isd.TERM_CODE, ata.TERM_DESCRIPTION, COUNT(distinct iss.IAP_SUBJECT_SESSION_KEY) AS Total_Sessions, SUM(isd.FEE) AS Total_Fee, MIN(isd.MAX_ENROLLMENT) AS Min_Enrollment, MAX(isd.MAX_ENROLLMENT) AS Max_Enrollment FROM IAP_SUBJECT_SESSION iss JOIN IAP_SUBJECT_DETAIL isd ON iss.IAP_SUBJECT_SESSION_KEY = isd.IAP_SUB... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.TERM_CODE"
],
"nl_phrase": "term code"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_DESCRIPTION"
],
"nl_phrase": "term description"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
"nl_... | [
[
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY"
],
[
"ACADEMIC_TERMS_ALL.TERM_CODE",
"IAP_SUBJECT_DETAIL.TERM_CODE"
]
] |
15 | dw | [
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_DETAIL",
"BUILDINGS"
] | What is the name of the building, total number of subjects, total fee, and shortest and longest sessions for each physical IAP session location? | SELECT b.BUILDING_NAME, COUNT(DISTINCT isd.ACTIVITY_TITLE) AS Total_Subjects, SUM(isd.FEE) AS Total_Fee, MIN(TIMESTAMPDIFF(MINUTE, STR_TO_DATE(iss.SESSION_START_TIME, '%h%i%p'), CASE WHEN STR_TO_DATE(iss.SESSION_START_TIME, '%h%i%p') > STR_TO_DATE(iss.SESSION_END_TIME, '%h%i%p') THEN STR_TO_DATE('1200PM', '%h%i%p') ELS... | N/A | [
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "name of the building"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.ACTIVITY_TITLE"
],
"nl_phrase": "subjects"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.FEE"
],
"nl_phrase": "fee"
},
{
... | [
[
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY"
],
[
"IAP_SUBJECT_SESSION.SESSION_LOCATION",
"BUILDINGS.BUILDING_NUMBER"
]
] |
16 | dw | [
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_DETAIL",
"BUILDINGS"
] | What is total number of subjects, the total fee, and the shortest and longest sessions, for all virtual IAP sessions? | SELECT COUNT(DISTINCT isd.ACTIVITY_TITLE) AS Total_Subjects, SUM(isd.FEE) AS Total_Fee, MIN(TIMESTAMPDIFF(MINUTE, STR_TO_DATE(iss.SESSION_START_TIME, '%h%i%p'), CASE WHEN STR_TO_DATE(iss.SESSION_START_TIME, '%h%i%p') > STR_TO_DATE(iss.SESSION_END_TIME, '%h%i%p') THEN STR_TO_DATE('1200PM', '%h%i%p') ELSE STR_TO_DATE(iss... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.ACTIVITY_TITLE"
],
"nl_phrase": "subjects"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.FEE"
],
"nl_phrase": "fee"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.SESSION_END_TIME",
"IAP_SUBJECT_SESSION.SESSION_START_TI... | [
[
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY"
],
[
"IAP_SUBJECT_SESSION.SESSION_LOCATION",
"BUILDINGS.BUILDING_NUMBER"
]
] |
17 | dw | [
"SIS_COURSE_DESCRIPTION",
"SIS_DEPARTMENT",
"SIS_SUBJECT_CODE"
] | What is the school code, school name, full name of the department, course level, total number of courses, and total number of degree-granting courses for each school code, department, and course level? | SELECT ssc.SCHOOL_CODE, ssc.SCHOOL_NAME, sd.DEPARTMENT_FULL_NAME, scd.COURSE_LEVEL, COUNT(DISTINCT scd.COURSE) AS Total_Courses, SUM(CASE WHEN scd.IS_DEGREE_GRANTING = 'Y' THEN 1 ELSE 0 END) AS Total_Degree_Granting_Courses FROM SIS_COURSE_DESCRIPTION scd JOIN SIS_DEPARTMENT sd ON scd.DEPARTMENT = sd.DEPARTMENT_CODE JO... | N/A | [
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_CODE"
],
"nl_phrase": "school code"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_NAME"
],
"nl_phrase": "school name"
},
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_FULL_NAME"
],
"nl_phrase": "full nam... | [
[
"SIS_DEPARTMENT.DEPARTMENT_CODE",
"SIS_COURSE_DESCRIPTION.DEPARTMENT"
],
[
"SIS_COURSE_DESCRIPTION.COURSE",
"SIS_SUBJECT_CODE.SUBJECT_CODE"
]
] |
18 | dw | [
"SIS_ADMIN_DEPARTMENT",
"SIS_DEPARTMENT",
"SIS_COURSE_DESCRIPTION",
"SIS_SUBJECT_CODE"
] | What are the different schools and departments that offer SIS courses? List their school code, school name, department code, department name, the total number of phone numbers, and the most common course level. | SELECT ssc.SCHOOL_CODE, ssc.SCHOOL_NAME, sd.DEPARTMENT_CODE, sad.SIS_ADMIN_DEPARTMENT_NAME, COUNT(DISTINCT sad.DEPARTMENT_PHONE_NUMBER) AS Total_Phone_Numbers, CASE WHEN SUM(CASE WHEN scd.COURSE_LEVEL = 'U' THEN 1 ELSE 0 END) >= SUM(CASE WHEN scd.COURSE_LEVEL = 'G' THEN 1 ELSE 0 END) THEN 'U' ELSE 'G' END AS Most_Commo... | N/A | [
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_CODE"
],
"nl_phrase": "school code"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_NAME"
],
"nl_phrase": "school name"
},
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
"nl_phrase": "department co... | [
[
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_CODE",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"SIS_DEPARTMENT.DEPARTMENT_CODE",
"SIS_COURSE_DESCRIPTION.DEPARTMENT"
],
[
"SIS_SUBJECT_CODE.SUBJECT_CODE",
"SIS_COURSE_DESCRIPTION.COURSE"
]
] |
19 | dw | [
"SIS_SUBJECT_CODE",
"SIS_COURSE_DESCRIPTION",
"SIS_DEPARTMENT"
] | What is the school code, school name, DLC key, the graduate level, total number of SIS subjects, the minimum and maximum course numbers, and the total number of departments offering subjects for each school? | SELECT ssc.SCHOOL_CODE, ssc.SCHOOL_NAME, sd.DLC_KEY, GRADUATE_LEVEL, COUNT(DISTINCT ssc.SUBJECT_CODE) AS Total_Subjects, MIN(ssc.COURSE_NUMBER) AS Min_Course_Number, MAX(ssc.COURSE_NUMBER) AS Max_Course_Number, COUNT(DISTINCT sd.DEPARTMENT_CODE) AS Total_Departments FROM SIS_SUBJECT_CODE ssc JOIN SIS_COURSE_DESCRIPTION... | N/A | [
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_CODE"
],
"nl_phrase": "school code"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.SCHOOL_NAME"
],
"nl_phrase": "school name"
},
{
"mapped_column": [
"SIS_DEPARTMENT.DLC_KEY"
],
"nl_phrase": "DLC key"
},
{
... | [
[
"SIS_SUBJECT_CODE.SUBJECT_CODE",
"SIS_COURSE_DESCRIPTION.COURSE"
],
[
"SIS_COURSE_DESCRIPTION.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
]
] |
20 | dw | [
"SPACE_DETAIL",
"BUILDINGS",
"SPACE_FLOOR",
"SPACE_UNIT",
"SPACE_SUPERVISOR_USAGE"
] | What is the building component, name of the building, square footage for all rooms, total number of floors, total number of rooms, total number of facility organizations, total number of supervisors, and total number of supervisees for each building component? | SELECT sd.BUILDING_COMPONENT, b.BUILDING_NAME, sd.Total_Square_Footage, COUNT(DISTINCT SF.FLOOR) AS Total_Number_Of_Floors, COUNT(DISTINCT sd.BUILDING_ROOM) AS Total_Rooms, COUNT(DISTINCT su.FCLT_ORGANIZATION_KEY) as Total_Number_FCLT, COUNT(DISTINCT ssu.MIT_ID) AS Total_Supervisors, SUM(ssu.NUM_OF_SUPERVISEES) AS Tota... | N/A | [
{
"mapped_column": [
"SPACE_DETAIL.BUILDING_COMPONENT"
],
"nl_phrase": "building component"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "name of the building"
},
{
"mapped_column": [
"SPACE_DETAIL.ROOM_SQUARE_FOOTAGE"
],
"nl_phrase"... | [
[
"SPACE_SUPERVISOR_USAGE.DEPT_NAMES",
"SPACE_UNIT.DLC_KEY"
]
] |
21 | dw | [
"SPACE_DETAIL",
"FCLT_BUILDING",
"SPACE_FLOOR",
"SPACE_UNIT",
"SPACE_SUPERVISOR_USAGE",
"FCLT_ORGANIZATION"
] | What is the DLC key, name of the DLC, total number of floors, total square footage, total number of facility organizations, total number of supervisors, total number of supervisees, and total building heights for each DLC? | SELECT su.DLC_KEY, fo.DLC_NAME, COUNT(DISTINCT sf.FLOOR) AS Total_Number_Of_Floors, sd.Total_Square_Footage, COUNT(DISTINCT su.FCLT_ORGANIZATION_KEY) AS Total_Number_Facility, COUNT(DISTINCT ssu.MIT_ID) AS Total_Supervisors, SUM(ssu.NUM_OF_SUPERVISEES) AS Total_Supervisees, SUM(fb.BUILDING_HEIGHT) AS Cumulative_Buildin... | N/A | [
{
"mapped_column": [
"SPACE_UNIT.DLC_KEY"
],
"nl_phrase": "DLC key"
},
{
"mapped_column": [
"FCLT_ORGANIZATION.DLC_NAME"
],
"nl_phrase": "name of the DLC"
},
{
"mapped_column": [
"SPACE_FLOOR.FLOOR"
],
"nl_phrase": "floors"
},
{
"mapped_column": ... | [
[
"SPACE_UNIT.DLC_KEY",
"SPACE_SUPERVISOR_USAGE.DEPT_NAMES"
]
] |
22 | dw | [
"TIP_SUBJECT_OFFERED",
"TIP_DETAIL",
"TIP_MATERIAL"
] | What is the department name, total number of types of TIP subjects, total number of enrolled students, the minimum and maximum rental new price for each department? | SELECT tso.OFFER_DEPT_NAME, COUNT(distinct tso.SUBJECT_ID) AS Total_Subjects, SUM(tso.NUM_ENROLLED_STUDENTS) AS Total_Enrolled_Students, MIN(tm.RENTAL_NEW_PRICE) AS Min_Rental_New_Price, MAX(tm.RENTAL_NEW_PRICE) AS Max_Rental_New_Price FROM TIP_SUBJECT_OFFERED tso JOIN TIP_DETAIL td ON tso.TIP_SUBJECT_OFFERED_KEY = td.... | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.OFFER_DEPT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.SUBJECT_ID"
],
"nl_phrase": "TIP subjects"
},
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.NUM_ENROLLED_STUDENTS"
],
"n... | [
[
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY",
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY"
],
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
]
] |
23 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"SUBJECT_OFFERED",
"ACADEMIC_TERMS",
"EMPLOYEE_DIRECTORY"
] | What are the details of courses offered in the current academic term, including the academic year, term code, hgn code, the total number of types of courses, the average number of units, the department name, the name and email address of the person in charge? | SELECT CC.ACADEMIC_YEAR, CC.TERM_CODE, SO.HGN_CODE, COUNT(DISTINCT CC.SUBJECT_ID) AS TOTAL_COURSES, AVG(CC.TOTAL_UNITS) AS AVERAGE_UNITS, CC.DEPARTMENT_NAME, ED.FULL_NAME AS RESPONSIBLE_FACULTY_NAME, ED.EMAIL_ADDRESS AS RESPONSIBLE_FACULTY_EMAIL FROM COURSE_CATALOG_SUBJECT_OFFERED CC JOIN SUBJECT_OFFERED SO ON CC.SUBJE... | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS.IS_CURRENT_TERM"
],
"nl_phrase": "current academic term"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.ACADEMIC_YEAR"
],
"nl_phrase": "academic year"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE... | [
[
"SUBJECT_OFFERED.SUBJECT_ID",
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_ID"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE",
"ACADEMIC_TERMS.TERM_CODE"
],
[
"EMPLOYEE_DIRECTORY.MIT_ID",
"SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID"
]
] |
24 | dw | [
"IAP_SUBJECT_DETAIL",
"IAP_SUBJECT_CATEGORY",
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_SPONSOR"
] | Retrieve information about the IAP subjects, including their titles, categories, session titles, session start time, session end time, sponsor names, and total number of sessions. | SELECT isd.ACTIVITY_TITLE, isc.IAP_CATEGORY_NAME, iss.SESSION_TITLE, iss.SESSION_START_TIME, iss.SESSION_END_TIME, isp.SPONSOR_NAME, COUNT(distinct iss.IAP_SUBJECT_SESSION_KEY) AS Total_Sessions FROM IAP_SUBJECT_DETAIL isd JOIN IAP_SUBJECT_CATEGORY isc ON isd.IAP_SUBJECT_CATEGORY_KEY = isc.IAP_SUBJECT_CATEGORY_KEY JOIN... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.ACTIVITY_TITLE"
],
"nl_phrase": "titles"
},
{
"mapped_column": [
"IAP_SUBJECT_CATEGORY.IAP_CATEGORY_NAME"
],
"nl_phrase": "categories"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.SESSION_TITLE"
],
"nl_phrase": "s... | [
[
"IAP_SUBJECT_CATEGORY.IAP_SUBJECT_CATEGORY_KEY",
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_CATEGORY_KEY"
],
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SPONSOR_KEY",
"IAP_SUBJECT_SPONSOR.IAP_SUBJECT_SPONSO... |
25 | dw | [
"SIS_DEPARTMENT",
"SIS_COURSE_DESCRIPTION",
"SIS_SUBJECT_CODE"
] | Show the department names, the corresponding SIS subject code, subject code descriptions, graduate level, and the total number of courses per department. | SELECT sd.DEPARTMENT_NAME, sc.SUBJECT_CODE, sc.SUBJECT_CODE_DESC, scd.GRADUATE_LEVEL, Total_Courses.Total_Courses FROM SIS_DEPARTMENT sd JOIN SIS_COURSE_DESCRIPTION scd ON sd.DEPARTMENT_CODE = scd.DEPARTMENT JOIN SIS_SUBJECT_CODE sc ON scd.COURSE = sc.COURSE_NUMBER JOIN (SELECT sd.DEPARTMENT_NAME, COUNT(DISTINCT COURSE... | N/A | [
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_NAME"
],
"nl_phrase": "department names"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.SUBJECT_CODE"
],
"nl_phrase": "SIS subject code"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.SUBJECT_CODE_DESC"
],
"nl_phrase... | [
[
"SIS_COURSE_DESCRIPTION.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"SIS_SUBJECT_CODE.COURSE_NUMBER",
"SIS_COURSE_DESCRIPTION.COURSE"
]
] |
26 | dw | [
"ACADEMIC_TERMS_ALL",
"ACADEMIC_TERM_PARAMETER",
"CIS_COURSE_CATALOG"
] | For each term, list the term code, the term description, whether the term is current or not, and the total number of types of CIS courses. | SELECT at.TERM_CODE, at.TERM_DESCRIPTION, at.IS_CURRENT_TERM2, COUNT(DISTINCT at.SUBJECT_ID) AS Total_SUBJECTS FROM (SELECT at.*, SUBJECT_ID, CASE WHEN at.ACADEMIC_YEAR = YEAR(CURDATE()) AND atp.IS_CURRENT_TERM = 'Y' THEN 'Y' ELSE 'N' END AS IS_CURRENT_TERM2 FROM (SELECT ACADEMIC_TERMS_ALL.*, CASE WHEN TERM_CODE LIKE '... | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_CODE"
],
"nl_phrase": "term code"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_DESCRIPTION"
],
"nl_phrase": "term description"
},
{
"mapped_column": [
"ACADEMIC_TERM_PARAMETER.IS_CURRENT_TERM"
],
"nl_phra... | [] |
27 | dw | [
"TIP_DETAIL",
"TIP_MATERIAL",
"TIP_MATERIAL_STATUS",
"TIP_SUBJECT_OFFERED",
"STUDENT_DEPARTMENT"
] | What is the author, school name, material status, total record counts, and total number of types of courses for each author and school? | SELECT tm.AUTHOR, sd.SCHOOL_NAME, tms.TIP_MATERIAL_STATUS, SUM(td.RECORD_COUNT) AS Total_Record_Count , COUNT(distinct td.SUBJECT_ID) AS Total_Subject FROM TIP_DETAIL td JOIN (select TIP_MATERIAL_KEY, CASE WHEN INSTR(AUTHOR, ';') > 0 THEN SUBSTR(AUTHOR, 1, INSTR(AUTHOR, ';') - 1) ELSE AUTHOR END AS AUTHOR FROM TIP_MATE... | N/A | [
{
"mapped_column": [
"TIP_MATERIAL.AUTHOR"
],
"nl_phrase": "author"
},
{
"mapped_column": [
"STUDENT_DEPARTMENT.SCHOOL_NAME"
],
"nl_phrase": "school name"
},
{
"mapped_column": [
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS"
],
"nl_phrase": "material status"... | [
[
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY",
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY"
],
[
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY",
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY"
],
[
"STUDENT_DEPARTMENT.DEPARTMENT_CODE",
"TIP_SUBJECT_OFFERED.OFFER_DEPT_CODE"
]
] |
28 | dw | [
"TIP_DETAIL",
"TIP_MATERIAL",
"TIP_MATERIAL_STATUS",
"TIP_SUBJECT_OFFERED"
] | What is the course number, subject title, material status, the total, min, and max new shelf price, the total, min, and max used shelf price, total number of schools and the total number of materials for each TIP subject and material status? | SELECT tso.COURSE_NUMBER, tso.SUBJECT_TITLE, tms.TIP_MATERIAL_STATUS, SUM(tm.NEW_SHELF_PRICE) as Total_New_Price, Min(tm.NEW_SHELF_PRICE) as Min_New_Price, Max(tm.NEW_SHELF_PRICE) as Max_New_Price, SUM(tm.USED_SHELF_PRICE) as Total_Used_Price, Min(tm.USED_SHELF_PRICE) as Min_Used_Price, Max(tm.USED_SHELF_PRICE) as Max_... | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.COURSE_NUMBER"
],
"nl_phrase": "course number"
},
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "subject title"
},
{
"mapped_column": [
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS"
],
"nl_... | [
[
"TIP_DETAIL.TIP_MATERIAL_KEY",
"TIP_MATERIAL.TIP_MATERIAL_KEY"
],
[
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY",
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY"
],
[
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY",
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY"
]
] |
29 | dw | [
"TIP_DETAIL",
"TIP_MATERIAL",
"TIP_MATERIAL_STATUS",
"TIP_SUBJECT_OFFERED",
"STUDENT_DEPARTMENT"
] | What is material status, the total number of materials, the total number of subjects, the total number of schools, and the most recent publication year for each material status? | SELECT tms.TIP_MATERIAL_STATUS, COUNT(DISTINCT td.TIP_MATERIAL_KEY) AS Total_Materials, COUNT(DISTINCT td.SUBJECT_ID) AS Total_Subjects, COUNT(DISTINCT sd.SCHOOL_NAME) AS Total_Num_Schools, MAX(tm.YEAR) AS Most_Recent_Year FROM TIP_DETAIL td JOIN TIP_MATERIAL tm ON td.TIP_MATERIAL_KEY = tm.TIP_MATERIAL_KEY JOIN TIP_MAT... | N/A | [
{
"mapped_column": [
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS"
],
"nl_phrase": "material status"
},
{
"mapped_column": [
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
"nl_phrase": "materials"
},
{
"mapped_column": [
"TIP_DETAIL.SUBJECT_ID"
],
"nl_phrase": "subjects"
... | [
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
[
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY",
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY"
],
[
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY",
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY"
],
[
"STUDENT_DEPARTMENT.DEPARTME... |
30 | dw | [
"ACADEMIC_TERMS_ALL",
"TIP_SUBJECT_OFFERED",
"TIP_DETAIL",
"TIP_MATERIAL",
"TIP_MATERIAL_STATUS"
] | What is the term description, whether the term is current or not, total number of types of TIP subjects offered and materials needed, the minimum and maximum number of enrolled students, the total number of schools offering subjects, and the total number of records for each term code? | SELECT at.TERM_DESCRIPTION, at.IS_CURRENT_TERM, COUNT(DISTINCT tso.COURSE_NUMBER) AS Total_Courses, COUNT(DISTINCT tm.ISBN) AS Total_Materials, MIN(tso.NUM_ENROLLED_STUDENTS) AS Min_Enrolled_Students, MAX(tso.NUM_ENROLLED_STUDENTS) AS Max_Enrolled_Students, COUNT(DISTINCT OFFER_SCHOOL_NAME) AS Total_Num_Schools, SUM(td... | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_DESCRIPTION"
],
"nl_phrase": "term description"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.IS_CURRENT_TERM"
],
"nl_phrase": "term is current or not"
},
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.COURSE_NUMBER"
],... | [
[
"ACADEMIC_TERMS_ALL.TERM_CODE",
"TIP_SUBJECT_OFFERED.TERM_CODE"
],
[
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY",
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY"
],
[
"TIP_DETAIL.TIP_MATERIAL_KEY",
"TIP_MATERIAL.TIP_MATERIAL_KEY"
],
[
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY",
"TIP_M... |
31 | dw | [
"BUILDINGS",
"FAC_BUILDING",
"FAC_ROOMS",
"FAC_ORGANIZATION",
"FAC_BUILDING_ADDRESS"
] | List all buildings with their names, building numbers, building height, street address, city, state, HR department name, assignable square footage, total and average square footage, ordered in descending order of assignable, total, and average square footage. | SELECT DISTINCT new.BUILDING_NAME, new.BUILDING_NUMBER, fb.BUILDING_HEIGHT, new.BUILDING_STREET_ADDRESS, fba.CITY, fba.STATE, new.HR_DEPARTMENT_NAME, new.BLDG_ASSIGNABLE_SQUARE_FOOTAGE, new.Total_Square_Footage, new.Avg_Square_Footage_Per_Room FROM (SELECT b.BUILDING_NAME, b.BUILDING_NUMBER, b.BUILDING_STREET_ADDRESS, ... | N/A | [
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "names"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_NUMBER"
],
"nl_phrase": "building numbers"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_HEIGHT"
],
"nl_phrase": "building height"
},
... | [
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"BUILDINGS.BUILDING_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
],
[
"FAC_ROOMS.ORGANIZATION_KEY",
"FAC_ORGANIZATION.ORGANIZATION_KEY"
]
] |
32 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"ACADEMIC_TERMS"
] | For the 2023 Fall term, what are the unique term descriptions, subject titles along with their prerequisites, total number of types of subjects per term code, instructor of this course, and the number of types of courses ever taught by the instructor? | WITH SubjectCounts AS (SELECT TERM_CODE, FALL_INSTRUCTORS, SUBJECT_ID, COUNT(*) OVER (PARTITION BY TERM_CODE) AS Total_Subjects, COUNT(*) OVER (PARTITION BY FALL_INSTRUCTORS) AS Experience FROM COURSE_CATALOG_SUBJECT_OFFERED WHERE TERM_CODE = '2023FA') SELECT DISTINCT at.TERM_DESCRIPTION, ccso.SUBJECT_TITLE, ccso.PRERE... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE"
],
"nl_phrase": "2023 Fall term"
},
{
"mapped_column": [
"ACADEMIC_TERMS.TERM_DESCRIPTION"
],
"nl_phrase": "term descriptions"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_TITLE"
... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE",
"ACADEMIC_TERMS.TERM_CODE"
]
] |
33 | dw | [
"FAC_ROOMS",
"FAC_BUILDING",
"FAC_FLOOR",
"FAC_ORGANIZATION"
] | Show the details of rooms including the full name of the rooms, the building names, floor numbers, the organizations occupying them, name of the departments occupying them, and the percentage of the room area over the assignable floor area and building. | SELECT fr.ROOM_FULL_NAME, fb.BUILDING_NAME, ff.FLOOR, fo.ORGANIZATION_NAME, fo.HR_DEPARTMENT_NAME, CASE WHEN ff.ASSIGNABLE_AREA = 0 THEN 0 ELSE fr.AREA/ff.ASSIGNABLE_AREA END AS PERC_OF_ASG_FLOOR, CASE WHEN fb.ASSIGNABLE_AREA = 0 THEN 0 ELSE fr.AREA/fb.ASSIGNABLE_AREA END AS PERC_OF_ASG_BUILDING FROM FAC_ROOMS fr JOIN ... | N/A | [
{
"mapped_column": [
"FAC_ROOMS.ROOM_FULL_NAME"
],
"nl_phrase": "full name of the rooms"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"FAC_FLOOR.FLOOR"
],
"nl_phrase": "floor numbers"
},
... | [
[
"FAC_ROOMS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
],
[
"FAC_ROOMS.FLOOR_KEY",
"FAC_FLOOR.FLOOR_KEY"
],
[
"FAC_ROOMS.ORGANIZATION_KEY",
"FAC_ORGANIZATION.ORGANIZATION_KEY"
]
] |
34 | dw | [
"FAC_ROOMS",
"FAC_BUILDING",
"FAC_FLOOR",
"FAC_ORGANIZATION"
] | Show the details of rooms including the full name of the rooms, the building names, floor numbers, the organizations occupying them, name of the departments occupying them, and the percentage of the room area over the floor area and building. | SELECT fr.ROOM_FULL_NAME, fb.BUILDING_NAME, ff.FLOOR, fo.ORGANIZATION_NAME, fo.HR_DEPARTMENT_NAME, CASE WHEN FLOOR_AREA = 0 THEN 0 ELSE fr.AREA/FLOOR_AREA END AS PERC_OF_FLOOR, CASE WHEN BUILDING_AREA = 0 THEN 0 ELSE fr.AREA/BUILDING_AREA END AS PERC_OF_BUILDING FROM (SELECT ROOM_FULL_NAME, BUILDING_KEY, FLOOR_KEY,ORGA... | N/A | [
{
"mapped_column": [
"FAC_ROOMS.ROOM_FULL_NAME"
],
"nl_phrase": "full name"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"FAC_FLOOR.FLOOR"
],
"nl_phrase": "floor numbers"
},
{
"mapp... | [] |
35 | dw | [
"SUBJECT_OFFERED",
"ACADEMIC_TERMS_ALL",
"EMPLOYEE_DIRECTORY"
] | What are the academic year, and instructors names for courses offered in the academic year 2022, along with the total number of types of courses per instructor? | SELECT ata.ACADEMIC_YEAR, ed.FULL_NAME, COUNT(distinct so.COURSE_NUMBER) AS Total_Courses FROM SUBJECT_OFFERED so JOIN ACADEMIC_TERMS_ALL ata ON so.TERM_CODE = ata.TERM_CODE JOIN EMPLOYEE_DIRECTORY ed ON so.RESPONSIBLE_FACULTY_MIT_ID = ed.MIT_ID WHERE ata.ACADEMIC_YEAR = 2022 GROUP BY ata.ACADEMIC_YEAR, ed.FULL_NAME; | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.ACADEMIC_YEAR"
],
"nl_phrase": "academic year"
},
{
"mapped_column": [
"EMPLOYEE_DIRECTORY.FULL_NAME"
],
"nl_phrase": "instructors names"
},
{
"mapped_column": [
"SUBJECT_OFFERED.COURSE_NUMBER"
],
"nl_phrase": "co... | [
[
"SUBJECT_OFFERED.TERM_CODE",
"ACADEMIC_TERMS_ALL.TERM_CODE"
],
[
"SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID",
"EMPLOYEE_DIRECTORY.MIT_ID"
]
] |
36 | dw | [
"FAC_BUILDING",
"FAC_ROOMS",
"FAC_FLOOR",
"FAC_ORGANIZATION"
] | What are the building names, department names, organizations, their highest and lowest floor number, along with the total number of rooms per each building key? | SELECT fb.BUILDING_NAME, fo.HR_DEPARTMENT_NAME, fo.ORGANIZATION, MAX(ff.LEVEL_ID) as MAX_FLOOR, MIN(ff.LEVEL_ID) as MIN_FLOOR, COUNT(distinct fr.FAC_ROOM_KEY) AS Total_Rooms FROM FAC_BUILDING fb JOIN FAC_ROOMS fr ON fb.FAC_BUILDING_KEY = fr.BUILDING_KEY JOIN FAC_FLOOR ff ON fr.FLOOR_KEY = ff.FLOOR_KEY JOIN FAC_ORGANIZA... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"FAC_ORGANIZATION.HR_DEPARTMENT_NAME"
],
"nl_phrase": "department names"
},
{
"mapped_column": [
"FAC_ORGANIZATION.ORGANIZATION"
],
"nl_phrase": "o... | [
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
],
[
"FAC_FLOOR.FLOOR_KEY",
"FAC_ROOMS.FLOOR_KEY"
],
[
"FAC_ORGANIZATION.ORGANIZATION_KEY",
"FAC_ROOMS.ORGANIZATION_KEY"
]
] |
37 | dw | [
"MIT_STUDENT_DIRECTORY",
"SIS_DEPARTMENT",
"SIS_ADMIN_DEPARTMENT"
] | Provide the complete information for students with the first name Kevin, including their full names, email addresses, department names, department phone numbers, school names, and the total student count per department and school. If a student is associated with more than one department, list a separate row for each de... | SELECT DISTINCT msd.FULL_NAME, msd.EMAIL_ADDRESS, sd.DEPARTMENT_NAME, sad.DEPARTMENT_PHONE_NUMBER, sd.SCHOOL_NAME, (SELECT COUNT(DISTINCT msd2.EMAIL_ADDRESS) FROM MIT_STUDENT_DIRECTORY msd2 JOIN SIS_DEPARTMENT sd2 ON msd2.DEPARTMENT = sd2.DEPARTMENT_CODE WHERE sd2.DEPARTMENT_CODE = sd.DEPARTMENT_CODE) AS Total_Students... | N/A | [
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.FIRST_NAME"
],
"nl_phrase": "first name"
},
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
"nl_phrase": "full names"
},
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.EMAIL_ADDRESS"
],
"nl_phrase": "ema... | [
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_CODE",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
]
] |
38 | dw | [
"EMPLOYEE_DIRECTORY",
"COURSE_CATALOG_SUBJECT_OFFERED",
"ACADEMIC_TERMS_ALL"
] | What are the unique titles of subjects offered in the fall term along with their instructor names, instructor emails, and the total number of types of subjects per instructor? | SELECT ccso.SUBJECT_TITLE, e.FULL_NAME AS INSTRUCTOR, e.EMAIL_ADDRESS, Total_Subjects.Total_Subjects FROM EMPLOYEE_DIRECTORY e JOIN COURSE_CATALOG_SUBJECT_OFFERED ccso ON ccso.RESPONSIBLE_FACULTY_MIT_ID = e.MIT_ID JOIN ACADEMIC_TERMS_ALL at ON ccso.TERM_CODE = at.TERM_CODE JOIN (SELECT ccso.RESPONSIBLE_FACULTY_MIT_ID, ... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "titles"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_ID"
],
"nl_phrase": "subjects"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_CODE"
],
"nl_phra... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID",
"EMPLOYEE_DIRECTORY.MIT_ID"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE",
"ACADEMIC_TERMS_ALL.TERM_CODE"
]
] |
39 | dw | [
"BUILDINGS",
"FAC_BUILDING",
"FAC_ROOMS",
"FAC_ORGANIZATION"
] | List the building names, names of HR departments occupying them, the total gross square footage, the total and average assignable square footage, and the built year per building key. | SELECT b.BUILDING_NAME, fo.HR_DEPARTMENT_NAME, SUM(b.BLDG_GROSS_SQUARE_FOOTAGE) AS Total_Gross_Sq_Ft, SUM(b.BLDG_ASSIGNABLE_SQUARE_FOOTAGE) AS Total_Assignable_Sq_Ft, AVG(b.BLDG_ASSIGNABLE_SQUARE_FOOTAGE) AS Avg_Assignable_Sq_Ft, YEAR(STR_TO_DATE(fb.DATE_BUILT, '%m/%d/%Y')) AS Year_Built FROM BUILDINGS b JOIN FAC_BUILD... | N/A | [
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"FAC_ORGANIZATION.HR_DEPARTMENT_NAME"
],
"nl_phrase": "names of HR departments"
},
{
"mapped_column": [
"BUILDINGS.BLDG_GROSS_SQUARE_FOOTAGE"
],
"nl_p... | [
[
"BUILDINGS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
],
[
"FAC_ROOMS.ORGANIZATION_KEY",
"FAC_ORGANIZATION.ORGANIZATION_KEY"
]
] |
40 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"EMPLOYEE_DIRECTORY",
"ACADEMIC_TERMS",
"FAC_ROOMS",
"FAC_FLOOR",
"BUILDINGS",
"FAC_BUILDING_ADDRESS"
] | Retrieve the titles of subjects offered in the summer term along with their descriptions, responsible faculty names, email address, building name, room name, floor level, building street address, and the total number of types of courses per departmnet. | SELECT ccso.SUBJECT_TITLE, ccso.SUBJECT_DESCRIPTION, ccso.RESPONSIBLE_FACULTY_NAME, ed.EMAIL_ADDRESS, b.BUILDING_NAME, fr.ROOM_FULL_NAME, ff.LEVEL_ID, b.BUILDING_STREET_ADDRESS, (SELECT COUNT(DISTINCT ccso2.SUBJECT_ID) FROM COURSE_CATALOG_SUBJECT_OFFERED ccso2 WHERE ccso2.DEPARTMENT_CODE = ccso.DEPARTMENT_CODE) AS Tota... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_TITLE"
],
"nl_phrase": "titles of subjects"
},
{
"mapped_column": [
"ACADEMIC_TERMS.TERM_CODE"
],
"nl_phrase": "summer term"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_DESCRIPTION"... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID",
"EMPLOYEE_DIRECTORY.MIT_ID"
],
[
"ACADEMIC_TERMS.TERM_CODE",
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.MEET_PLACE",
"FAC_ROOMS.FAC_ROOM_KEY"
],
[
"FAC_ROOMS.FLOOR_KEY",
"F... |
41 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"CIS_HASS_ATTRIBUTE",
"SIS_DEPARTMENT",
"ACADEMIC_TERMS_ALL"
] | For each term code, list the term description, attribute desciption, department name, school name, and the number of subjects in the area of humanities, arts and social sciences. | SELECT ata.TERM_DESCRIPTION, ccso.HASS_ATTRIBUTE_DESC, sd.DEPARTMENT_NAME, sd.SCHOOL_NAME, (SELECT COUNT(DISTINCT ccso2.SUBJECT_ID) FROM COURSE_CATALOG_SUBJECT_OFFERED ccso2 JOIN CIS_HASS_ATTRIBUTE cha2 ON ccso2.HASS_ATTRIBUTE = cha2.HASS_ATTRIBUTE WHERE ccso2.TERM_CODE = ata.TERM_CODE AND cha2.CIS_ATTRIBUTE_GROUP = ch... | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_CODE"
],
"nl_phrase": "term code"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_DESCRIPTION"
],
"nl_phrase": "term description"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.HASS_ATTRIBUTE_DESC"
],
... | [
[
"CIS_HASS_ATTRIBUTE.HASS_ATTRIBUTE",
"COURSE_CATALOG_SUBJECT_OFFERED.HASS_ATTRIBUTE"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.DEPARTMENT_CODE",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"ACADEMIC_TERMS_ALL.TERM_CODE",
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE"
]
] |
42 | dw | [
"FAC_BUILDING",
"FAC_BUILDING_ADDRESS",
"FAC_FLOOR",
"FAC_ROOMS",
"BUILDINGS"
] | List building names, their height, street address, city, state, postal code, their gross and assignable square footage, the smallest and largest floor level and the total area of all rooms for each building key. | SELECT fb.BUILDING_NAME, fb.BUILDING_HEIGHT, b.BUILDING_STREET_ADDRESS, fba.CITY, fba.STATE, fba.POSTAL_CODE, fb.EXT_GROSS_AREA, fb.ASSIGNABLE_AREA, MIN(ff.LEVEL_ID) as SMALLEST_FLOOR, MAX(LEVEL_ID) AS HIGHEST_FLOOR, SUM(fr.AREA) AS Total_Room_Area FROM FAC_BUILDING fb JOIN FAC_BUILDING_ADDRESS fba ON fb.FAC_BUILDING_K... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building names"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_HEIGHT"
],
"nl_phrase": "height"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_STREET_ADDRESS",
"FAC_BUILDING_ADDRESS.ADDRESS_PU... | [
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_BUILDING_ADDRESS.BUILDING_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_FLOOR.BUILDING_KEY"
],
[
"FAC_FLOOR.FLOOR_KEY",
"FAC_ROOMS.FLOOR_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"BUILDINGS.BUILDING_KEY"
]
] |
43 | dw | [
"CIP",
"SIS_COURSE_DESCRIPTION",
"SIS_DEPARTMENT"
] | What is the category title, version, department name, school name, total number of courses for each course level, and the total number of degree-granting courses for each CIP category code? | SELECT c.CATEGORY_TITLE, c.VERSION, sd.DEPARTMENT_NAME, sd.SCHOOL_NAME, SUM(CASE WHEN scd.COURSE_LEVEL = 'U' THEN 1 ELSE 0 END) AS Total_U_Courses, SUM(CASE WHEN scd.COURSE_LEVEL = 'G' THEN 1 ELSE 0 END) AS Total_G_Courses, SUM(CASE WHEN scd.IS_DEGREE_GRANTING = 'Y' THEN 1 ELSE 0 END) AS Total_Degree_Granting_Courses F... | N/A | [
{
"mapped_column": [
"CIP.CATEGORY_TITLE"
],
"nl_phrase": "category title"
},
{
"mapped_column": [
"CIP.VERSION"
],
"nl_phrase": "version"
},
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_col... | [
[
"SIS_COURSE_DESCRIPTION.CIP_PROGRAM_CODE",
"CIP.PROGRAM_CODE"
],
[
"SIS_COURSE_DESCRIPTION.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
]
] |
44 | dw | [
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_MATERIAL_STATUS"
] | What is the total number of library materials, the minimum and maximum publication years, and the total number of materials status for each course name? | SELECT COUNT(distinct lrc.CATALOG_SYSTEM_NUMBER) AS Total_Materials, MIN(lrc.CATALOG_YEAR) AS Min_Publication_Year, MAX(lrc.CATALOG_YEAR) AS Max_Publication_Year, COUNT(DISTINCT lms.LIBRARY_MATERIAL_STATUS) AS Total_Statuses FROM LIBRARY_COURSE_INSTRUCTOR lci JOIN LIBRARY_RESERVE_MATRL_DETAIL lrmd ON lci.LIBRARY_COURSE... | N/A | [
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_SYSTEM_NUMBER"
],
"nl_phrase": "library materials"
},
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_YEAR"
],
"nl_phrase": "publication years"
},
{
"mapped_column": [
"LIBRARY_MATERIAL_STATUS.LIBRARY_M... | [
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_COURSE_INSTRUCTOR_KEY",
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_MATE... |
45 | dw | [
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_SUBJECT_OFFERED"
] | What is the total number of library reserve materials, the minimum and maximum publication years, and the total number of enrolled students for each course instructor? | SELECT COUNT(distinct lrc.CATALOG_SYSTEM_NUMBER) AS Total_Materials, MIN(lrc.CATALOG_YEAR) AS Min_Publication_Year, MAX(lrc.CATALOG_YEAR) AS Max_Publication_Year, SUM(lso.NUM_ENROLLED_STUDENTS) AS Total_Enrolled_Students FROM LIBRARY_COURSE_INSTRUCTOR lci JOIN LIBRARY_RESERVE_MATRL_DETAIL lrmd ON lci.LIBRARY_COURSE_INS... | N/A | [
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_SYSTEM_NUMBER"
],
"nl_phrase": "library reserve materials"
},
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_YEAR"
],
"nl_phrase": "publication years"
},
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.N... | [
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_COURSE_INSTRUCTOR_KEY",
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY"
],
[
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJ... |
46 | dw | [
"LIBRARY_MATERIAL_STATUS",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_SUBJECT_OFFERED",
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_CATALOG",
"ACADEMIC_TERMS_ALL"
] | What is the material status, term description, total number of courses and materials, occurences in departments and school, and the total number of instructors for each library material status code and term code? | SELECT lms.LIBRARY_MATERIAL_STATUS, ata.TERM_DESCRIPTION, COUNT(DISTINCT lso.COURSE_NUMBER) AS Total_Courses, COUNT(DISTINCT lrc.CATALOG_SYSTEM_NUMBER) AS Total_Materials, COUNT(DISTINCT lso.OFFER_DEPT_CODE), COUNT(DISTINCT lso.OFFER_SCHOOL_NAME), COUNT(DISTINCT lci.INSTRUCTOR_NAME) AS Total_Instructors FROM LIBRARY_MA... | N/A | [
{
"mapped_column": [
"LIBRARY_MATERIAL_STATUS.LIBRARY_MATERIAL_STATUS"
],
"nl_phrase": "material status"
},
{
"mapped_column": [
"ACADEMIC_TERMS_ALL.TERM_DESCRIPTION"
],
"nl_phrase": "term description"
},
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.COURSE_NUMB... | [
[
"LIBRARY_MATERIAL_STATUS.LIBRARY_MATERIAL_STATUS_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_MATERIAL_STATUS_KEY"
],
[
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_OFFERED_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OFFERED_KEY"
],
[
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRU... |
47 | dw | [
"SPACE_UNIT",
"SPACE_DETAIL",
"FCLT_ORGANIZATION",
"SPACE_USAGE",
"SPACE_FLOOR",
"BUILDINGS",
"FCLT_BUILDING_ADDRESS"
] | For building 36, list all space units, their floor and building name, building street address, their space usage, and the number of organizations and space units on the same building and floor. | SELECT DISTINCT su.SPACE_UNIT, sf.FLOOR, b.BUILDING_NAME, b.BUILDING_STREET_ADDRESS, su2.SPACE_USAGE, (SELECT COUNT(DISTINCT fo2.FCLT_ORGANIZATION_KEY) FROM SPACE_UNIT su2 JOIN SPACE_DETAIL sd2 ON su2.SPACE_UNIT_KEY = sd2.SPACE_UNIT_KEY JOIN FCLT_ORGANIZATION fo2 ON fo2.FCLT_ORGANIZATION_KEY = su2.FCLT_ORGANIZATION_KEY... | N/A | [
{
"mapped_column": [
"BUILDINGS.BUILDING_NUMBER"
],
"nl_phrase": "building 36"
},
{
"mapped_column": [
"SPACE_UNIT.SPACE_UNIT"
],
"nl_phrase": "space units"
},
{
"mapped_column": [
"SPACE_FLOOR.FLOOR"
],
"nl_phrase": "floor"
},
{
"mapped_column":... | [
[
"SPACE_DETAIL.SPACE_UNIT_KEY",
"SPACE_UNIT.SPACE_UNIT_KEY"
],
[
"SPACE_USAGE.SPACE_USAGE_KEY",
"SPACE_DETAIL.SPACE_USAGE_KEY"
],
[
"SPACE_DETAIL.FLOOR_KEY",
"SPACE_FLOOR.FLOOR_KEY"
],
[
"SPACE_DETAIL.BUILDING_KEY",
"BUILDINGS.BUILDING_KEY"
],
[
"FCLT_ORGANIZATIO... |
48 | dw | [
"MOIRA_LIST_DETAIL",
"MOIRA_LIST",
"MOIRA_LIST_OWNER"
] | For each distinct mailing list containing more than 1000 people and with a name starting with A (case insensitive), provide its name, whether it is a mailing list, whether it is a moira group, whether it is a NFS group, the owner of the mailing list, and the number of people in the list. | SELECT ml.MOIRA_LIST_NAME, ml.IS_MOIRA_MAILING_LIST, ml.IS_MOIRA_GROUP, ml.IS_NFS_GROUP, mlo.OWNER, member_counts.occurrences FROM MOIRA_LIST_DETAIL mld JOIN MOIRA_LIST ml ON mld.MOIRA_LIST_KEY = ml.MOIRA_LIST_KEY JOIN MOIRA_LIST_OWNER mlo ON mld.MOIRA_LIST_OWNER_KEY = mlo.MOIRA_LIST_OWNER_KEY JOIN ( SELECT mld.MOIRA_L... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"MOIRA_LIST.IS_MOIRA_MAILING_LIST"
],
"nl_phrase": "mailing list"
},
{
"mapped_column": [
"MOIRA_LIST.IS_MOIRA_GROUP"
],
"nl_phrase": "moira group"
},
{
... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_OWNER.MOIRA_LIST_OWNER_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_OWNER_KEY"
]
] |
49 | dw | [
"MOIRA_LIST_DETAIL",
"MOIRA_LIST",
"MOIRA_LIST_OWNER"
] | List the mailing lists with the largest number of members and the least number of members, including their names, owners, public status, hidden status, and number of members in the list. If a mailing list has multiple owners, create a separate entry for each owner. Similarly, if multiple lists share the minimum or maxi... | WITH Occurrences AS ( SELECT mld.MOIRA_LIST_KEY, mld.MOIRA_LIST_OWNER_KEY, COUNT(mld.MOIRA_LIST_MEMBER) AS occurrences FROM MOIRA_LIST_DETAIL mld GROUP BY mld.MOIRA_LIST_KEY,mld.MOIRA_LIST_OWNER_KEY ) SELECT DISTINCT ml.MOIRA_LIST_NAME, mlo.OWNER, ml.IS_PUBLIC, ml.IS_HIDDEN, o.occurrences FROM Occurrences o JOIN MOIRA_... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "names"
},
{
"mapped_column": [
"MOIRA_LIST_OWNER.OWNER"
],
"nl_phrase": "owners"
},
{
"mapped_column": [
"MOIRA_LIST.IS_PUBLIC"
],
"nl_phrase": "public status"
},
{
"mapped_column... | [
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_OWNER_KEY",
"MOIRA_LIST_OWNER.MOIRA_LIST_OWNER_KEY"
]
] |
50 | dw | [
"MOIRA_LIST",
"COURSE_CATALOG_SUBJECT_OFFERED",
"EMPLOYEE_DIRECTORY",
"MOIRA_LIST_DETAIL",
"ACADEMIC_TERMS"
] | For email lists with names starting with C (case insensitive) and containing faculty who teach courses in the summer in financial aid years after 2001, provide the name of the list, the number of people in the list, and the number of faculty in the list. | WITH FilteredLists AS ( SELECT ml.MOIRA_LIST_KEY, ml.MOIRA_LIST_NAME FROM MOIRA_LIST ml WHERE upper(ml.MOIRA_LIST_NAME) LIKE 'C%' ) SELECT DISTINCT fl.MOIRA_LIST_NAME AS Moira_List_Name, COUNT(mld.MOIRA_LIST_MEMBER) AS Member_Count, COUNT(DISTINCT ed.MIT_ID) AS Distinct_Faculty_Count FROM COURSE_CATALOG_SUBJECT_OFFERED... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "names"
},
{
"mapped_column": [
"EMPLOYEE_DIRECTORY.MIT_ID"
],
"nl_phrase": "faculty"
},
{
"mapped_column": [
"ACADEMIC_TERMS.TERM_CODE"
],
"nl_phrase": "courses in the summer"
},
{
... | [
[
"EMPLOYEE_DIRECTORY.MIT_ID",
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID"
],
[
"ACADEMIC_TERMS.TERM_CODE",
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE"
]
] |
51 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"SE_PERSON",
"MIT_STUDENT_DIRECTORY",
"SIS_DEPARTMENT"
] | Regarding the mailing list about duo users, provide the number of students in this list, and the number of departments and schools associated with these students. | SELECT COUNT(DISTINCT se.MIT_ID) AS Student_Count, COUNT(DISTINCT sd.DEPARTMENT_CODE) AS Department_Count, COUNT(DISTINCT sd.SCHOOL_CODE) AS School_Count FROM MOIRA_LIST ml JOIN MOIRA_LIST_DETAIL mld ON ml.MOIRA_LIST_KEY = mld.MOIRA_LIST_KEY JOIN SE_PERSON se ON upper(mld.MOIRA_LIST_MEMBER) = upper(se.KRB_NAME) JOIN MI... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "duo users"
},
{
"mapped_column": [
"SE_PERSON.MIT_ID"
],
"nl_phrase": "students"
},
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
"nl_phrase": "departments"
},
{
"mappe... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
],
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
]
] |
52 | dw | [
"MOIRA_LIST_DETAIL",
"EMPLOYEE_DIRECTORY",
"COURSE_CATALOG_SUBJECT_OFFERED",
"MOIRA_LIST"
] | For faculty who are responsible for courses in 2023 fall term, list the name of mailing lists with ten members that they subscribe to, the number of faculty in these lists, and the number of courses associated with those faculty. | WITH filtered_lists AS ( SELECT mld.MOIRA_LIST_KEY FROM MOIRA_LIST_DETAIL mld GROUP BY mld.MOIRA_LIST_KEY HAVING COUNT(DISTINCT mld.MOIRA_LIST_MEMBER) = 10 ), instructor_courses AS ( SELECT fl.MOIRA_LIST_KEY, ccso.RESPONSIBLE_FACULTY_MIT_ID, COUNT(DISTINCT ccso.SUBJECT_TITLE) AS course_count FROM filtered_lists fl JOIN... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID"
],
"nl_phrase": "faculty"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE"
],
"nl_phrase": "2023 fall term"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
... | [
[
"employee_directory.MIT_ID",
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID"
],
[
"employee_directory.KRB_NAME",
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
]
] |
53 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_SUBJECT_OFFERED",
"SE_PERSON"
] | For each course instructor in the 'keeper-zephyr' mailing list, provide the name of mailing lists they subscribe to, instructor name, earliest and latest publication years, and total number of enrolled students. | WITH FilteredLists AS ( SELECT ml.MOIRA_LIST_KEY, ml.MOIRA_LIST_NAME, mld.MOIRA_LIST_MEMBER FROM MOIRA_LIST ml JOIN MOIRA_LIST_DETAIL mld ON ml.MOIRA_LIST_KEY = mld.MOIRA_LIST_KEY WHERE ml.MOIRA_LIST_NAME='keeper-zephyr' ) SELECT fl.MOIRA_LIST_NAME, lci.INSTRUCTOR_NAME, MIN(lrc.CATALOG_YEAR) AS Min_Publication_Year, MA... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "'keeper-zephyr' mailing list"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name of mailing lists"
},
{
"mapped_column": [
"LIBRARY_COURSE_INSTRUCTOR.INSTRUCTOR_NAME"
... | [
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_COURSE_INSTRUCTOR_KEY",
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_O... |
54 | dw | [
"SE_PERSON",
"MOIRA_LIST_DETAIL",
"MOIRA_LIST",
"MOIRA_LIST_OWNER"
] | For each mailing list with a name beginning with R (case insensitive), and that Professor Ayden Hopkins is subscribed to, list its name, description, owner, number of people in the list, and number of tenured faculty in the list. | WITH FilteredLists AS ( SELECT DISTINCT ml.MOIRA_LIST_KEY, ml.MOIRA_LIST_NAME, ml.MOIRA_LIST_DESCRIPTION, mlo.OWNER FROM SE_PERSON se JOIN MOIRA_LIST_DETAIL mld ON UPPER(se.KRB_NAME) = UPPER(mld.MOIRA_LIST_MEMBER) JOIN MOIRA_LIST ml ON mld.MOIRA_LIST_KEY = ml.MOIRA_LIST_KEY JOIN MOIRA_LIST_OWNER mlo ON mld.MOIRA_LIST_O... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"SE_PERSON.FULL_NAME"
],
"nl_phrase": "Professor Ayden Hopkins"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_DESCRIPTION"
],
"nl_phrase": "description"
}... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_OWNER.MOIRA_LIST_OWNER_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_OWNER_KEY"
]
] |
55 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"MIT_STUDENT_DIRECTORY",
"SE_PERSON",
"SIS_ADMIN_DEPARTMENT"
] | For the email list with name 'date-destiny', list the name of the list, department name, the number of students from the Management department, and the percentage of students who are from the Management department, rounded to two decimal places. | WITH FilteredList AS ( SELECT MOIRA_LIST_KEY, MOIRA_LIST_NAME FROM MOIRA_LIST WHERE MOIRA_LIST_NAME = 'date-destiny' ), FilteredListDetails AS ( SELECT mld.MOIRA_LIST_KEY, mld.MOIRA_LIST_MEMBER FROM MOIRA_LIST_DETAIL mld JOIN FilteredList fl ON mld.MOIRA_LIST_KEY = fl.MOIRA_LIST_KEY ) SELECT ml.MOIRA_LIST_NAME, COUNT(C... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
],
"nl_phras... | [
[
"SE_PERSON.FULL_NAME",
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
[
"SE_PERSON.KRB_NAME",
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPART... |
56 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"FAC_BUILDING",
"FAC_ROOMS",
"FAC_FLOOR",
"EMPLOYEE_DIRECTORY"
] | For the building with the most floors, list the building name and the names of the mailing lists staring with a (case insensitive) that the building employees with kerberos starting with c (case insensitive) subscribe to. | WITH FilteredMoiraLists AS ( SELECT MOIRA_LIST_KEY, MOIRA_LIST_NAME FROM MOIRA_LIST WHERE MOIRA_LIST_NAME LIKE 'a%' ), FilteredMoiraListDetails AS ( SELECT mld.MOIRA_LIST_MEMBER, mld.MOIRA_LIST_KEY FROM MOIRA_LIST_DETAIL mld JOIN FilteredMoiraLists fml ON mld.MOIRA_LIST_KEY = fml.MOIRA_LIST_KEY ), FloorsWithLevels AS (... | N/A | [
{
"mapped_column": [
"FAC_FLOOR.LEVEL_ID"
],
"nl_phrase": "floors"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building name"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "names of the mailing lists"
},... | [
[
"FAC_ROOMS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
],
[
"FAC_FLOOR.FLOOR_KEY",
"FAC_ROOMS.FLOOR_KEY"
],
[
"FAC_ROOMS.FAC_ROOM_KEY",
"EMPLOYEE_DIRECTORY.OFFICE_LOCATION"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER",
"EMPLOYEE_DIRECTORY.KRB_NAME"
],
[
"MOIRA_... |
57 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"EMPLOYEE_DIRECTORY",
"MOIRA_LIST_DETAIL",
"MOIRA_LIST"
] | For the email lists subscribed by faculty members with last names begin with Y, list the names of the lists, the total number of subjects managed by faculty in those mailing lists, and the number of such faculty in the lists. | SELECT DISTINCT ml.MOIRA_LIST_NAME, COUNT(ccso.SUBJECT_ID) AS course_count, COUNT(DISTINCT ccso.RESPONSIBLE_FACULTY_NAME) AS distinct_faculty_count FROM COURSE_CATALOG_SUBJECT_OFFERED CCSO JOIN EMPLOYEE_DIRECTORY E ON ccso.RESPONSIBLE_FACULTY_MIT_ID = E.MIT_ID JOIN MOIRA_LIST_DETAIL mld ON upper(e.KRB_NAME_UPPERCASE) =... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_NAME"
],
"nl_phrase": "last names"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "names of the lists"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.RESPONSIBLE_FACULTY_MIT_ID",
"EMPLOYEE_DIRECTORY.MIT_ID"
]
] |
58 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"MIT_STUDENT_DIRECTORY",
"SIS_DEPARTMENT",
"SIS_ADMIN_DEPARTMENT",
"SE_PERSON"
] | For students with last names starting with H who are subscribed to mailing list 'beacon-date-date', list the names of the students, the phone numbers of departments they belong to, and the size of the mailing list 'beacon-date-date' that they are subscribed to. | WITH FilteredMoiraLists AS ( SELECT MOIRA_LIST_KEY, MOIRA_LIST_NAME FROM MOIRA_LIST WHERE MOIRA_LIST_NAME = 'beacon-date-date' ), FilteredMoiraListDetails AS ( SELECT mld.MOIRA_LIST_MEMBER, mld.MOIRA_LIST_KEY FROM MOIRA_LIST_DETAIL mld JOIN FilteredMoiraLists fml ON mld.MOIRA_LIST_KEY = fml.MOIRA_LIST_KEY ), MailingLis... | N/A | [
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.LAST_NAME"
],
"nl_phrase": "last names"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "mailing list 'beacon-date-date'"
},
{
"mapped_column": [
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
"nl_ph... | [
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"SIS_DEPARTMENT.DEPARTMENT_CODE",
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_CODE"
],
[
"MIT_STUDENT_DIRECTORY.FULL_NAME",
"SE_... |
59 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"SE_PERSON"
] | Give the count of mailing lists with names starting with B that include members from the Electrical Engineering and Computer Science department, along with the name of the list starting with B that have the highest number of members from that department and the corresponding member count. | WITH DistinctLists AS ( SELECT ml.MOIRA_LIST_NAME, COUNT(DISTINCT se.MIT_ID) AS Member_Count FROM MOIRA_LIST ml JOIN MOIRA_LIST_DETAIL mld ON ml.MOIRA_LIST_KEY = mld.MOIRA_LIST_KEY JOIN SE_PERSON se ON UPPER(mld.MOIRA_LIST_MEMBER) = UPPER(se.KRB_NAME) WHERE UPPER(ml.MOIRA_LIST_NAME) LIKE 'B%' AND se.ORGANIZATION = 'Ele... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "mailing lists"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "names"
},
{
"mapped_column": [
"SE_PERSON.MIT_ID"
],
"nl_phrase": "members"
},
{
"mapped_colum... | [
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER",
"SE_PERSON.KRB_NAME"
]
] |
60 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"MIT_STUDENT_DIRECTORY",
"SE_PERSON",
"SIS_ADMIN_DEPARTMENT"
] | For the 'kangaroo-inspire-yearn' email list, for each department present in the list, list the department name, the number of students in that department, and its percentage relative to the students in the mailing list. | WITH FilteredList AS ( SELECT MOIRA_LIST_KEY, MOIRA_LIST_NAME FROM MOIRA_LIST WHERE MOIRA_LIST_NAME = 'kangaroo-inspire-yearn' ), FilteredListDetails AS ( SELECT mld.MOIRA_LIST_KEY, mld.MOIRA_LIST_MEMBER FROM MOIRA_LIST_DETAIL mld JOIN FilteredList fl ON mld.MOIRA_LIST_KEY = fl.MOIRA_LIST_KEY ), DepartmentCounts AS ( S... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "'kangaroo-inspire-yearn' email list"
},
{
"mapped_column": [
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"MOIRA_LIST_DETAIL.MOIRA_LI... | [
[
"SE_PERSON.FULL_NAME",
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
[
"SE_PERSON.KRB_NAME",
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPART... |
61 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"EMPLOYEE_DIRECTORY"
] | Among the mailing lists subscribed by people with physical offices in building 24, provide the name of the most subscribed mailing list and the total number of subscribers. | WITH MailingListStats AS ( SELECT ml.MOIRA_LIST_NAME, COUNT(DISTINCT mld.MOIRA_LIST_MEMBER) AS Total_Members FROM MOIRA_LIST ml JOIN MOIRA_LIST_DETAIL mld ON ml.MOIRA_LIST_KEY = mld.MOIRA_LIST_KEY JOIN EMPLOYEE_DIRECTORY ed ON mld.MOIRA_LIST_MEMBER = ed.KRB_NAME WHERE ed.OFFICE_LOCATION LIKE '24%' GROUP BY ml.MOIRA_LIS... | N/A | [
{
"mapped_column": [
"EMPLOYEE_DIRECTORY.OFFICE_LOCATION"
],
"nl_phrase": "physical offices in building 24"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
],
"nl_p... | [
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"EMPLOYEE_DIRECTORY.KRB_NAME",
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER"
]
] |
62 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"SE_PERSON"
] | For email lists subscribed by either support staff or faculty, list its name, the number of subscribers that are support staff, the number of subscribers that are faculty, as well as its active status. | SELECT ml.MOIRA_LIST_NAME, SUM(CASE WHEN se.EMPLOYEE_TYPE = 'Support Staff' THEN 1 ELSE 0 END) AS SUPPORT_COUNT, SUM(CASE WHEN se.EMPLOYEE_TYPE = 'Faculty' THEN 1 ELSE 0 END) AS FACULTY_COUNT, ml.IS_ACTIVE FROM MOIRA_LIST ml JOIN MOIRA_LIST_DETAIL mld ON ml.MOIRA_LIST_KEY = mld.MOIRA_LIST_KEY JOIN SE_PERSON se ON upper... | N/A | [
{
"mapped_column": [
"SE_PERSON.EMPLOYEE_TYPE"
],
"nl_phrase": "support staff or faculty"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"SE_PERSON.EMPLOYEE_TYPE"
],
"nl_phrase": "subscribers"
},
{... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
]
] |
63 | dw | [
"MOIRA_LIST",
"MOIRA_LIST_DETAIL",
"SE_PERSON",
"MIT_STUDENT_DIRECTORY",
"SIS_ADMIN_DEPARTMENT"
] | For the 'ocean-apple' mailing list, identify the department with the highest student count. Provide the department name, phone number, and the total number of students subscribed to the mailing list from that department. If multiple departments have the same highest count, list each one separately. | WITH FilteredList AS ( SELECT MOIRA_LIST_KEY, MOIRA_LIST_NAME FROM MOIRA_LIST WHERE MOIRA_LIST_NAME = 'ocean-apple' ), FilteredListDetails AS ( SELECT mld.MOIRA_LIST_KEY, mld.MOIRA_LIST_MEMBER FROM MOIRA_LIST_DETAIL mld JOIN FilteredList fl ON mld.MOIRA_LIST_KEY = fl.MOIRA_LIST_KEY ), StudentMemberCounts AS ( SELECT fl... | N/A | [
{
"mapped_column": [
"MOIRA_LIST.MOIRA_LIST_NAME"
],
"nl_phrase": "'ocean-apple' mailing list"
},
{
"mapped_column": [
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPARTMENT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"SIS_ADMIN_DEPARTMENT.DEPARTMENT_PHO... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER",
"SE_PERSON.KRB_NAME"
],
[
"SE_PERSON.FULL_NAME",
"MIT_STUDENT_DIRECTORY.FULL_NAME"
],
[
"MIT_STUDENT_DIRECTORY.DEPARTMENT",
"SIS_ADMIN_DEPARTMENT.SIS_ADMIN_DEPART... |
64 | dw | [
"MOIRA_LIST_DETAIL",
"MOIRA_LIST",
"MOIRA_LIST_OWNER"
] | For each mailing list, list its owner, owner type, the member visibility ('Public Members' if public, and 'Hidden Members' otherwise), and the number of members of this type of visibility. For each owner and owner type, include a grand total for all members in the format of (owner, owner type, null, total members). | WITH MemberVisibility AS ( SELECT mo.OWNER, mo.OWNER_TYPE, ml.MOIRA_LIST_NAME, CASE WHEN ml.IS_PUBLIC = 'Y' THEN 'Public Members' WHEN ml.IS_PUBLIC = 'N' THEN 'Hidden Members' ELSE NULL END AS member_visibility, COUNT(DISTINCT mld.MOIRA_LIST_MEMBER) AS total_members FROM MOIRA_LIST_DETAIL mld JOIN MOIRA_LIST ml ON mld.... | N/A | [
{
"mapped_column": [
"MOIRA_LIST_OWNER.OWNER"
],
"nl_phrase": "owner"
},
{
"mapped_column": [
"MOIRA_LIST_OWNER.OWNER_TYPE"
],
"nl_phrase": "owner type"
},
{
"mapped_column": [
"MOIRA_LIST.IS_PUBLIC"
],
"nl_phrase": "member visibility"
},
{
"mapp... | [
[
"MOIRA_LIST.MOIRA_LIST_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY"
],
[
"MOIRA_LIST_OWNER.MOIRA_LIST_OWNER_KEY",
"MOIRA_LIST_DETAIL.MOIRA_LIST_OWNER_KEY"
]
] |
65 | dw | [
"SUBJECT_OFFERED_SUMMARY",
"SIS_COURSE_DESCRIPTION",
"TIP_DETAIL",
"TIP_MATERIAL",
"LIBRARY_RESERVE_CATALOG"
] | Group biology courses by cluster type and course level. For each group, list the name of the department, the course title, cluster type, total enrollments, average enrollment within its cluster, course level, number of unique course materials, average new and used prices for TIP materials, total material record count f... | WITH EnrollmentWithAnalytics AS ( SELECT sos.SUBJECT_ID, sos.SUBJECT_TITLE, sos.OFFER_DEPT_NAME AS DEPARTMENT, sos.CLUSTER_TYPE, sos.NUM_ENROLLED_STUDENTS, AVG(sos.NUM_ENROLLED_STUDENTS) OVER (PARTITION BY sos.CLUSTER_TYPE) AS avg_enrollment_in_cluster, scd.COURSE_LEVEL FROM SUBJECT_OFFERED_SUMMARY sos LEFT JOIN SIS_CO... | N/A | [
{
"mapped_column": [
"SUBJECT_OFFERED_SUMMARY.OFFER_DEPT_NAME"
],
"nl_phrase": "biology courses"
},
{
"mapped_column": [
"SUBJECT_OFFERED_SUMMARY.CLUSTER_TYPE"
],
"nl_phrase": "cluster type"
},
{
"mapped_column": [
"SIS_COURSE_DESCRIPTION.COURSE_LEVEL"
],
... | [
[
"SUBJECT_OFFERED_SUMMARY.COURSE_NUMBER",
"SIS_COURSE_DESCRIPTION.COURSE"
],
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
]
] |
66 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"ACADEMIC_TERMS",
"SIS_DEPARTMENT",
"SIS_COURSE_DESCRIPTION"
] | For subjects offered this year in either the Fall or Spring term, list its department name, school name, subject ID, subject title, course level, total units, the term it is offered ('Spring' for Spring term and 'Fall' for Fall term), term description, the number of distinct instructors teaching in the Fall, and the nu... | WITH SubjectsByTerm AS ( SELECT cc.SUBJECT_ID, cc.SUBJECT_TITLE, cc.TOTAL_UNITS, cc.DEPARTMENT_NAME, CASE WHEN cc.TERM_CODE LIKE '%FA' THEN 'Fall' WHEN cc.TERM_CODE LIKE '%SP' THEN 'Spring' END AS offered_term, at.TERM_DESCRIPTION AS term_description, sd.SCHOOL_NAME, scd.COURSE_LEVEL, cc.FALL_INSTRUCTORS, cc.SPRING_INS... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.IS_OFFERED_THIS_YEAR"
],
"nl_phrase": "subjects offered this year"
},
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.DEPARTMENT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"SIS_DEPART... | [
[
"COURSE_CATALOG_SUBJECT_OFFERED.TERM_CODE",
"ACADEMIC_TERMS.TERM_CODE"
],
[
"COURSE_CATALOG_SUBJECT_OFFERED.DEPARTMENT_CODE",
"SIS_DEPARTMENT.DEPARTMENT_CODE"
],
[
"SIS_COURSE_DESCRIPTION.COURSE",
"COURSE_CATALOG_SUBJECT_OFFERED.SUBJECT_CODE"
]
] |
67 | dw | [
"CIS_COURSE_CATALOG",
"SIS_SUBJECT_CODE",
"SUBJECT_OFFERED_SUMMARY",
"SIS_DEPARTMENT"
] | For Political Science courses with HASS attributes, for each attribute, list the name and description of the attribute, the number of unique subjects, average units, the total enrollment, the number of departments that grant degrees, and the subject code description. | WITH HASSAttributes AS (SELECT cc.HASS_ATTRIBUTE, cc.HASS_ATTRIBUTE_DESC, cc.SUBJECT_ID, cc.TOTAL_UNITS, sos.NUM_ENROLLED_STUDENTS, sd.DEPARTMENT_NAME, sd.IS_DEGREE_GRANTING, sc.SUBJECT_CODE_DESC FROM CIS_COURSE_CATALOG cc JOIN SIS_SUBJECT_CODE sc ON cc.SUBJECT_CODE = sc.SUBJECT_CODE JOIN SUBJECT_OFFERED_SUMMARY sos ON... | N/A | [
{
"mapped_column": [
"SIS_DEPARTMENT.DEPARTMENT_NAME"
],
"nl_phrase": "Political Science"
},
{
"mapped_column": [
"CIS_COURSE_CATALOG.HASS_ATTRIBUTE"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"CIS_COURSE_CATALOG.HASS_ATTRIBUTE_DESC"
],
"nl_phrase": ... | [
[
"CIS_COURSE_CATALOG.SUBJECT_CODE",
"SIS_SUBJECT_CODE.SUBJECT_CODE"
],
[
"SUBJECT_OFFERED_SUMMARY.SUBJECT_ID",
"CIS_COURSE_CATALOG.SUBJECT_ID"
],
[
"SIS_DEPARTMENT.DEPARTMENT_CODE",
"SIS_SUBJECT_CODE.DEPARTMENT_CODE"
]
] |
68 | dw | [
"SUBJECT_OFFERED_SUMMARY",
"SIS_COURSE_DESCRIPTION",
"SIS_DEPARTMENT"
] | Group subjects by cluster type, department offering the subject, and the school name. For each group, list the cluster type, name of the department, school name, whether the department grants degrees, total number of subjects, total enrollment, and average enrollment. Exclude clusters or schools with no student data. | WITH ClusterSummary AS (SELECT sos.CLUSTER_TYPE, sos.OFFER_DEPT_NAME AS DEPARTMENT, sd.SCHOOL_NAME, COUNT(DISTINCT sos.SUBJECT_ID) AS num_subjects, SUM(sos.NUM_ENROLLED_STUDENTS) AS total_enrollment, AVG(sos.NUM_ENROLLED_STUDENTS) AS avg_enrollment, sd.IS_DEGREE_GRANTING AS degree_granting_status FROM SUBJECT_OFFERED_S... | N/A | [
{
"mapped_column": [
"SUBJECT_OFFERED_SUMMARY.CLUSTER_TYPE"
],
"nl_phrase": "cluster type"
},
{
"mapped_column": [
"SUBJECT_OFFERED_SUMMARY.OFFER_DEPT_NAME"
],
"nl_phrase": "name of the department"
},
{
"mapped_column": [
"SIS_DEPARTMENT.SCHOOL_NAME"
],
... | [
[
"SUBJECT_OFFERED_SUMMARY.COURSE_NUMBER",
"SIS_COURSE_DESCRIPTION.COURSE"
],
[
"SIS_DEPARTMENT.DEPARTMENT_CODE",
"SUBJECT_OFFERED_SUMMARY.OFFER_DEPT_CODE"
]
] |
69 | dw | [
"FAC_BUILDING",
"SUBJECT_OFFERED",
"SIS_COURSE_DESCRIPTION",
"FAC_BUILDING_ADDRESS"
] | Group classes that take place in buildings at MIT by the building name and course level. For each group, provide the name of the building, the course level ('Graduate' or 'Undergraduate'), the total number of unique courses of such level, and total instructors for these courses. Include subtotals for each building and ... | SELECT ba.BUILDING_NAME, ba.course_level, ba.unique_courses, ba.total_instructors FROM (SELECT b.BUILDING_NAME, CASE WHEN scd.COURSE_LEVEL = 'G' THEN 'Graduate' WHEN scd.COURSE_LEVEL = 'U' THEN 'Undergraduate' ELSE 'Other' END AS course_level, COUNT(DISTINCT s.SUBJECT_ID) AS unique_courses, SUM(COUNT(DISTINCT s.RESPONS... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.SITE"
],
"nl_phrase": "buildings at MIT"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "name of the building"
},
{
"mapped_column": [
"SIS_COURSE_DESCRIPTION.COURSE_LEVEL"
],
"nl_phrase": "course ... | [
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"SUBJECT_OFFERED.MEET_PLACE"
],
[
"SUBJECT_OFFERED.COURSE_NUMBER",
"SIS_COURSE_DESCRIPTION.COURSE"
],
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
]
] |
70 | dw | [
"COURSE_CATALOG_SUBJECT_OFFERED",
"FAC_ROOMS",
"FAC_BUILDING",
"FAC_MAJOR_USE",
"FAC_BUILDING_ADDRESS",
"SIS_COURSE_DESCRIPTION"
] | For each course, provide the room number of course location, building name, building number, building city, building state, area, organization name, room usage, term code, course level, the total number of subjects, unique meeting times, and total units. Do not include meet place or meet times with NULL values. | WITH MeetingPlaceDetails AS ( SELECT c.MEET_PLACE AS room_number, c.MEET_TIME, c.TERM_CODE, c.SUBJECT_ID, c.TOTAL_UNITS, b.BUILDING_NAME, b.BUILDING_NUMBER, ba.CITY AS building_city, ba.STATE AS building_state, fr.AREA, fr.ORGANIZATION_NAME, fmu.MAJOR_USE, scd.COURSE_LEVEL AS course_level, scd.COURSE_DESCRIPTION AS cou... | N/A | [
{
"mapped_column": [
"COURSE_CATALOG_SUBJECT_OFFERED.MEET_PLACE"
],
"nl_phrase": "room number"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME"
],
"nl_phrase": "building name"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NUMBER"
],
"nl_phrase": "bu... | [
[
"FAC_ROOMS.FAC_ROOM_KEY",
"COURSE_CATALOG_SUBJECT_OFFERED.MEET_PLACE"
],
[
"FAC_ROOMS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
],
[
"FAC_ROOMS.MAJOR_USE_KEY",
"FAC_MAJOR_USE.MAJOR_USE_KEY"
],
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
... |
71 | dw | [
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_MATERIAL_STATUS",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_SUBJECT_OFFERED",
"SIS_SUBJECT_CODE"
] | Consider only books cataloged on or after 2000. For each library material status and department, list the material status, department name, number of associated catalog items, and the total number of enrolled students in courses using those materials. Include subtotals for each material status and a grand total across ... | WITH MaterialUsage AS ( SELECT lms.LIBRARY_MATERIAL_STATUS, sc.DEPARTMENT_NAME AS department, COUNT(DISTINCT lrc.LIBRARY_RESERVE_CATALOG_KEY) AS num_catalog_items, SUM(lso.NUM_ENROLLED_STUDENTS) AS total_students FROM LIBRARY_RESERVE_MATRL_DETAIL lrd JOIN LIBRARY_MATERIAL_STATUS lms ON lrd.LIBRARY_MATERIAL_STATUS_KEY =... | N/A | [
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.CATALOG_YEAR"
],
"nl_phrase": "cataloged on or after 2000"
},
{
"mapped_column": [
"LIBRARY_MATERIAL_STATUS.LIBRARY_MATERIAL_STATUS"
],
"nl_phrase": "material status"
},
{
"mapped_column": [
"SIS_SUBJECT_CODE.DEPARTM... | [
[
"LIBRARY_MATERIAL_STATUS.LIBRARY_MATERIAL_STATUS_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_MATERIAL_STATUS_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OF... |
72 | dw | [
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_COURSE_INSTRUCTOR",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_SUBJECT_OFFERED"
] | For each department in the library system, list the name of the department, total number of courses using library materials, the number of catalog items associated with those courses, and the average enrollment per course. Include a grand total across all departments (the corresponding department field should be 'Grand... | WITH DepartmentLibraryUsage AS ( SELECT lci.DEPARTMENT, lci.COURSE_NAME, COUNT(DISTINCT lrc.LIBRARY_RESERVE_CATALOG_KEY) AS num_catalog_items, SUM(lso.NUM_ENROLLED_STUDENTS) AS total_students FROM LIBRARY_RESERVE_MATRL_DETAIL lrd JOIN LIBRARY_COURSE_INSTRUCTOR lci ON lrd.LIBRARY_COURSE_INSTRUCTOR_KEY = lci.LIBRARY_COUR... | N/A | [
{
"mapped_column": [
"LIBRARY_COURSE_INSTRUCTOR.DEPARTMENT"
],
"nl_phrase": "name of the department"
},
{
"mapped_column": [
"LIBRARY_COURSE_INSTRUCTOR.COURSE_NAME"
],
"nl_phrase": "courses"
},
{
"mapped_column": [
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALO... | [
[
"LIBRARY_COURSE_INSTRUCTOR.LIBRARY_COURSE_INSTRUCTOR_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_COURSE_INSTRUCTOR_KEY"
],
[
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_O... |
73 | dw | [
"TIP_DETAIL",
"TIP_MATERIAL",
"TIP_SUBJECT_OFFERED",
"TIP_MATERIAL_STATUS",
"SIS_DEPARTMENT"
] | For each department and school offering courses with materials, list the department name, school name, number of unique course materials, number of courses, average new and used shelf prices of materials, total material records, and number of distinct material statuses. Include a grand total across all schools and depa... | WITH MaterialCostDetails AS ( SELECT tso.OFFER_DEPT_NAME AS department_name, tso.SUBJECT_TITLE, tm.TITLE AS material_title, tm.NEW_SHELF_PRICE, tm.USED_SHELF_PRICE, tms.TIP_MATERIAL_STATUS AS material_status, tms.TIP_MATERIAL_STATUS_CODE AS material_status_code, td.RECORD_COUNT AS material_record_count, ts.SCHOOL_NAME ... | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.IS_NO_COURSE_MATERIAL"
],
"nl_phrase": "courses with materials"
},
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.OFFER_DEPT_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"SIS_DEPARTMENT.SCHOOL_NAME"
],
... | [
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
[
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY",
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY"
],
[
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY",
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY"
],
[
"SIS_DEPARTMENT.DEPARTMENT_C... |
74 | dw | [
"TIP_DETAIL",
"TIP_MATERIAL_STATUS",
"TIP_MATERIAL",
"TIP_SUBJECT_OFFERED"
] | For each TIP material status, list the total number of unique materials associated with the status, the total number of records associated with the status, and the total student enrollment associated with the status. Any material status with null values should be displayed as 'No material status'. Additionally, include... | SELECT COALESCE(material_status, 'Grand Total') AS material_status, num_materials, total_record_count, total_enrollment FROM (SELECT CASE WHEN material_status IS NULL THEN 'No material status' ELSE material_status END AS material_status, COUNT(DISTINCT material_title) AS num_materials, SUM(RECORD_COUNT) AS total_record... | N/A | [
{
"mapped_column": [
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS"
],
"nl_phrase": "TIP material status"
},
{
"mapped_column": [
"TIP_MATERIAL.TITLE"
],
"nl_phrase": "materials"
},
{
"mapped_column": [
"TIP_DETAIL.RECORD_COUNT"
],
"nl_phrase": "records"
},... | [
[
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY",
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY"
],
[
"TIP_DETAIL.TIP_MATERIAL_KEY",
"TIP_MATERIAL.TIP_MATERIAL_KEY"
],
[
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY",
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY"
]
] |
75 | dw | [
"FCLT_ROOMS",
"FCLT_FLOOR",
"FCLT_BUILDING",
"FCLT_ORGANIZATION"
] | For each room, list its associated building name, floor number, room number, ownership type, organization name, number of rooms, area, and percentage of area relative to the building. Include subtotals across floors, subtotals across all floors for each building, and a grand total across all buildings. For the subtotal... | SELECT Building_Name, FLOOR, Room, OWNERSHIP_TYPE, Organization_Name, FORMAT(Total_Rooms, 0) AS Total_Rooms, FORMAT(Total_Area, 0) AS Total_Area, Percent_Of_Total FROM (SELECT 0 AS SortOrder, NULL AS Building_Name, NULL AS FLOOR, NULL AS Room, NULL AS OWNERSHIP_TYPE, NULL AS Organization_Name, SUM(Total_Rooms) AS Total... | N/A | [
{
"mapped_column": [
"FCLT_ROOMS.FCLT_ROOM_KEY"
],
"nl_phrase": "room"
},
{
"mapped_column": [
"FCLT_BUILDING.BUILDING_NAME_LONG"
],
"nl_phrase": "building name"
},
{
"mapped_column": [
"FCLT_FLOOR.FLOOR"
],
"nl_phrase": "floor number"
},
{
"mapp... | [
[
"FCLT_FLOOR.FCLT_FLOOR_KEY",
"FCLT_ROOMS.FCLT_FLOOR_KEY"
],
[
"FCLT_BUILDING.FCLT_BUILDING_KEY",
"FCLT_FLOOR.FCLT_BUILDING_KEY"
],
[
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY",
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY"
]
] |
76 | dw | [
"ACADEMIC_TERMS",
"TIME_DAY",
"TIME_MONTH",
"TIME_QUARTER",
"ACADEMIC_TERM_PARAMETER"
] | For each financial aid year and academic year, list the number of fiscal periods, quarters, the start term date, the end term date, and number of distinct department-level term parameters. | WITH FinancialAidDetails AS ( SELECT at.TERM_CODE, at.TERM_DESCRIPTION, at.ACADEMIC_YEAR, at.FINANCIAL_AID_YEAR, td.START_DATE AS Term_Start_Date, td.END_DATE AS Term_End_Date, tm.FISCAL_PERIOD, tm.FISCAL_YEAR, tq.FY_QUARTER_CODE, tp.TERM_PARAMETER AS Dept_Term_Param FROM ACADEMIC_TERMS at JOIN TIME_DAY td ON at.TERM_S... | N/A | [
{
"mapped_column": [
"ACADEMIC_TERMS.FINANCIAL_AID_YEAR"
],
"nl_phrase": "financial aid year"
},
{
"mapped_column": [
"ACADEMIC_TERMS.ACADEMIC_YEAR"
],
"nl_phrase": "academic year"
},
{
"mapped_column": [
"TIME_MONTH.FISCAL_PERIOD"
],
"nl_phrase": "fisca... | [
[
"ACADEMIC_TERMS.TERM_START_DATE",
"TIME_DAY.CALENDAR_DATE"
],
[
"TIME_DAY.FISCAL_PERIOD",
"TIME_MONTH.FISCAL_PERIOD"
],
[
"TIME_QUARTER.FISCAL_YEAR",
"TIME_MONTH.FISCAL_YEAR"
],
[
"ACADEMIC_TERM_PARAMETER.TERM_CODE",
"ACADEMIC_TERMS.TERM_CODE"
]
] |
77 | dw | [
"FCLT_BUILDING",
"FCLT_FLOOR",
"FCLT_BUILDING_ADDRESS",
"FCLT_ROOMS",
"FCLT_ORGANIZATION"
] | Group buildings by campus sectors. For each group, list the campus sector, name of the building, city and state where the building is located, total number of floors, total assignable area, total number of rooms, total number of organizations, ownership type, and a rank column indicating the order (1-indexed) of this r... | WITH BuildingArea AS ( SELECT b.CAMPUS_SECTOR, b.BUILDING_NAME_LONG AS Building_Name, f.FLOOR AS Floor_Number, b.ASSIGNABLE_AREA, ba.CITY AS Building_City, ba.STATE AS Building_State FROM FCLT_BUILDING b LEFT JOIN FCLT_FLOOR f ON b.FCLT_BUILDING_KEY = f.FCLT_BUILDING_KEY LEFT JOIN FCLT_BUILDING_ADDRESS ba ON b.FCLT_BUI... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING.CAMPUS_SECTOR"
],
"nl_phrase": "campus sector"
},
{
"mapped_column": [
"FCLT_BUILDING.BUILDING_NAME_LONG"
],
"nl_phrase": "name of the building"
},
{
"mapped_column": [
"FCLT_BUILDING_ADDRESS.CITY"
],
"nl_phrase": "cit... | [
[
"FCLT_BUILDING.FCLT_BUILDING_KEY",
"FCLT_FLOOR.FCLT_BUILDING_KEY"
],
[
"FCLT_BUILDING.FCLT_BUILDING_KEY",
"FCLT_BUILDING_ADDRESS.FCLT_BUILDING_KEY"
],
[
"FCLT_BUILDING.FCLT_BUILDING_KEY",
"FCLT_ROOMS.FCLT_BUILDING_KEY"
],
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"FCLT_BUILDING... |
78 | dw | [
"TIP_MATERIAL",
"TIP_DETAIL",
"TIP_SUBJECT_OFFERED",
"LIBRARY_RESERVE_CATALOG",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_SUBJECT_OFFERED"
] | For each department, list the name of the department, the title of the TIP material associated with the department, author, ISBN, library term code, and whether it is available in the library reserves ('Available in Library' if yes and 'Not Available in Library' otherwise), the total number of instructors per library b... | WITH TIPMaterials AS ( SELECT tm.TITLE AS TIP_Title, tm.ISBN AS TIP_ISBN, tso.OFFER_DEPT_NAME AS TIP_Department FROM TIP_MATERIAL tm JOIN TIP_DETAIL td ON tm.TIP_MATERIAL_KEY = td.TIP_MATERIAL_KEY JOIN TIP_SUBJECT_OFFERED tso ON td.TIP_SUBJECT_OFFERED_KEY = tso.TIP_SUBJECT_OFFERED_KEY ), InstructorCounts AS ( SELECT lr... | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.OFFER_DEPT_NAME"
],
"nl_phrase": "name of the department"
},
{
"mapped_column": [
"TIP_MATERIAL.TITLE"
],
"nl_phrase": "title of the TIP material"
},
{
"mapped_column": [
"TIP_MATERIAL.AUTHOR"
],
"nl_phrase": "au... | [
[
"TIP_MATERIAL.TIP_MATERIAL_KEY",
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
[
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY",
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY"
],
[
... |
79 | dw | [
"TIP_DETAIL",
"TIP_SUBJECT_OFFERED",
"TIP_MATERIAL_STATUS",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_SUBJECT_OFFERED",
"LIBRARY_MATERIAL_STATUS"
] | For each department and material status, list the name of the department, the material status, the number of TIP materials associated with this department and status, the number of library materials associated with this department and status, the total number of TIP and library materials associated with this department... | WITH TIPMaterialStatuses AS ( SELECT tso.OFFER_DEPT_NAME AS Department, tms.TIP_MATERIAL_STATUS AS Status, COUNT(td.TIP_MATERIAL_KEY) AS Total_TIP_Materials FROM TIP_DETAIL td JOIN TIP_SUBJECT_OFFERED tso ON td.TIP_SUBJECT_OFFERED_KEY = tso.TIP_SUBJECT_OFFERED_KEY JOIN TIP_MATERIAL_STATUS tms ON td.TIP_MATERIAL_STATUS_... | N/A | [
{
"mapped_column": [
"TIP_SUBJECT_OFFERED.OFFER_DEPT_NAME"
],
"nl_phrase": "name of the department"
},
{
"mapped_column": [
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS"
],
"nl_phrase": "material status"
},
{
"mapped_column": [
"TIP_DETAIL.TIP_MATERIAL_KEY"
],
... | [
[
"TIP_DETAIL.TIP_SUBJECT_OFFERED_KEY",
"TIP_SUBJECT_OFFERED.TIP_SUBJECT_OFFERED_KEY"
],
[
"TIP_MATERIAL_STATUS.TIP_MATERIAL_STATUS_KEY",
"TIP_DETAIL.TIP_MATERIAL_STATUS_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OFFERED_KEY",
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_OFF... |
80 | dw | [
"FAC_BUILDING_ADDRESS",
"FAC_BUILDING",
"BUILDINGS"
] | For each building that is not a subdivision, list the building number, full name, street address, building type, occupancy date, ownership type, and site location. You should also include three rows at the end showing the number of owned, leased, all buildings at MIT that are not subdivisions, in the format of (null, #... | SELECT * FROM (SELECT FAC_BUILDING.BUILDING_NUMBER AS BUILDING, FAC_BUILDING.BUILDING_NAME_LONG AS NAME, BUILDINGS.BUILDING_STREET_ADDRESS AS `STREET ADDRESS`, FAC_BUILDING.BUILDING_TYPE AS TYPE, FAC_BUILDING.DATE_OCCUPIED, FAC_BUILDING.OWNERSHIP_TYPE AS OWNERSHIP, FAC_BUILDING.SITE AS SITE FROM FAC_BUILDING_ADDRESS JO... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.PARENT_BUILDING_NUMBER"
],
"nl_phrase": "subdivision"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NUMBER"
],
"nl_phrase": "building number"
},
{
"mapped_column": [
"FAC_BUILDING.BUILDING_NAME_LONG"
],
"nl_phrase": "f... | [
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"FAC_BUILDING.FAC_BUILDING_KEY"
],
[
"BUILDINGS.BUILDING_KEY",
"FAC_BUILDING_ADDRESS.BUILDING_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_BUILDING_ADDRESS.BUILDING_KEY"
],
[
"FAC_BUILDING.FAC_BUILDING_KEY",
"FAC_BUILDING_ADDRESS.... |
81 | dw | [
"FAC_BUILDING"
] | For each owned building that is not a subdivision, list the construction start year, the building number, and the year of initial occupancy. Display the construction start year only if it differs from the previous row. If the year of initial occupancy or construction start year is unknown, display 'UNKNOWN'. You should... | SELECT CASE WHEN LAG(year_construct_began) OVER (ORDER BY year_construct_began, building_sort, BUILDING_NUMBER) = year_construct_began THEN NULL WHEN BUILDING_NUMBER IS NULL THEN NULL ELSE year_construct_began END AS `YEAR CONSTRUCT BEGAN`, BUILDING_NUMBER AS BUILDING, year_occupied AS `YEAR INITIALLY OCCUPIED` FROM (S... | N/A | [
{
"mapped_column": [
"FAC_BUILDING.PARENT_BUILDING_NUMBER"
],
"nl_phrase": "subdivision"
},
{
"mapped_column": [
"FAC_BUILDING.DATE_BUILT"
],
"nl_phrase": "construction start year"
},
{
"mapped_column": [
"FAC_BUILDING.PARENT_BUILDING_NUMBER"
],
"nl_phra... | [] |
82 | dw | [
"FCLT_BUILDING_HIST",
"FCLT_ROOMS",
"FCLT_ORGANIZATION"
] | Group all buildings at MIT into either owned or leased. For each group, state the ownership type, usage type, number of buildings, gross square footage, number of rooms, and the number of associated organizations. Display the ownership type only if it differs from the previous row. Include subtotals for each group and ... | SELECT CASE WHEN LAG(OWNERSHIP) OVER (ORDER BY OWNERSHIP_TYPE DESC, TYPE) = OWNERSHIP THEN NULL ELSE OWNERSHIP END AS OWNERSHIP, TYPE, BUILDINGS, GROSS_SQFT, ROOM_COUNT, ORG_COUNT FROM (SELECT CASE WHEN FLOOR.OWNERSHIP_TYPE IS NULL OR FLOOR.BUILDING_USE IS NULL THEN 'UNKNOWN' ELSE CONCAT(FLOOR.OWNERSHIP_TYPE, '2') END ... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING_HIST.SITE"
],
"nl_phrase": "buildings at MIT"
},
{
"mapped_column": [
"FCLT_BUILDING_HIST.OWNERSHIP_TYPE"
],
"nl_phrase": "ownership type"
},
{
"mapped_column": [
"FCLT_BUILDING_HIST.BUILDING_USE"
],
"nl_phrase": "usag... | [
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"FCLT_BUILDING_HIST.FCLT_BUILDING_KEY"
],
[
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY",
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY"
]
] |
83 | dw | [
"FCLT_BUILDING",
"FCLT_ROOMS",
"FCLT_ORGANIZATION"
] | For each building use, list the type, the number of distinct buildings (excluding subdivisions) of this use, the total gross square footage of these buildings, and the number of unique organizations associated with the rooms in these buildings. If the building is used as a residence, display the usage type as "RESIDENT... | SELECT * FROM (SELECT CASE WHEN FLOOR.BUILDING_USE = 'RESIDENT' THEN 'RESIDENTIAL' ELSE FLOOR.BUILDING_USE END AS TYPE, COUNT(DISTINCT COALESCE(FLOOR.PARENT_BUILDING_NUMBER, FLOOR.FCLT_BUILDING_KEY)) AS BUILDINGS, FORMAT(SUM(FLOOR.EXT_GROSS_AREA), 0) AS GROSS_SQFT, COUNT(DISTINCT org.FCLT_ORGANIZATION_KEY) AS NUM_ORGAN... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING.BUILDING_USE"
],
"nl_phrase": "building use"
},
{
"mapped_column": [
"FCLT_BUILDING.PARENT_BUILDING_NUMBER",
"FCLT_BUILDING.FCLT_BUILDING_KEY"
],
"nl_phrase": "buildings"
},
{
"mapped_column": [
"FCLT_BUILDING.EXT_GROSS_... | [
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"FCLT_BUILDING.FCLT_BUILDING_KEY"
],
[
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY",
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY"
],
[
"FCLT_ROOMS.FCLT_BUILDING_KEY",
"FCLT_BUILDING.FCLT_BUILDING_KEY"
],
[
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY",
"FCLT_ORG... |
84 | dw | [
"FCLT_ROOMS",
"FCLT_ORGANIZATION",
"MASTER_DEPT_HIERARCHY"
] | For each organization except Cambridge-MIT Institute, list its ID, number, level, formatted name according to level (if level is 2, there should be 1 space before the name, if level is 3, there should be 2 space before the name, up to level 6), whether it is assignable ('ASSIGNABLE' if assignable, 'NON-ASSIGNABLE' othe... | SELECT o1.organization_id, organization_number, organization_level, CASE WHEN organization_level = 2 THEN CONCAT(' ', organization_name) WHEN organization_level = 3 THEN CONCAT(' ', organization_name) WHEN organization_level = 4 THEN CONCAT(' ', organization_name) WHEN organization_level = 5 THEN CONCAT(' ', organizati... | N/A | [
{
"mapped_column": [
"FCLT_ORGANIZATION.ORGANIZATION_NAME"
],
"nl_phrase": "Cambridge-MIT Institute"
},
{
"mapped_column": [
"FCLT_ORGANIZATION.ORGANIZATION_ID"
],
"nl_phrase": "ID"
},
{
"mapped_column": [
"FCLT_ORGANIZATION.ORGANIZATION_NUMBER"
],
"nl_p... | [
[
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY",
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY"
],
[
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY",
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY"
],
[
"FCLT_ROOMS.FCLT_ORGANIZATION_KEY",
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY"
],
[
"FCLT_ORGANIZATION.DLC_KE... |
85 | dw | [
"FCLT_ROOMS",
"FCLT_MAJOR_USE"
] | Group all rooms into whether or not they are assignable and the major use descriptions. For each group, state "ASSIGNABLE" if the room is assignable and "NON-ASSIGNABLE" otherwise, the major use description, the total number of rooms, total area, and average area. Include subtotals for each group and a grand total acro... | SELECT CASE WHEN LAG(assign) OVER (ORDER BY assign) = assign THEN NULL ELSE assign END AS assign, CASE WHEN LAG(muse) OVER (ORDER BY assign, muse_sort) = muse THEN NULL ELSE muse END AS muse, rmcnt, area, area_avg FROM (SELECT CASE WHEN GROUPING(ASSIGNABLE) = 1 THEN NULL ELSE CASE WHEN ASSIGNABLE = 1 THEN 'ASSIGNABLE' ... | N/A | [
{
"mapped_column": [
"FCLT_ROOMS.ROOM"
],
"nl_phrase": "rooms"
},
{
"mapped_column": [
"FCLT_MAJOR_USE.ASSIGNABLE"
],
"nl_phrase": "assignable"
},
{
"mapped_column": [
"FCLT_MAJOR_USE.MAJOR_USE",
"FCLT_ROOMS.MAJOR_USE_DESC",
"FCLT_MAJOR_USE.DESCRIPTI... | [
[
"FCLT_ROOMS.FCLT_MAJOR_USE_KEY",
"FCLT_MAJOR_USE.FCLT_MAJOR_USE_KEY"
]
] |
86 | dw | [
"FAC_ROOMS",
"FCLT_ORGANIZATION",
"BUILDINGS",
"FAC_FLOOR"
] | List each floor key and department name within the Stata building, as well as the number of rooms, total area, and average area per department on each floor. Include subtotals for each floor and a grand total across all floors. Sort the results by floor key and department name in ascending order. Exclude departments wi... | SELECT CASE WHEN LAG(FLOOR_KEY) OVER (ORDER BY COALESCE(FAC_FLOOR.FLOOR_SORT_SEQUENCE, 999), flsort, orgname) = FLOOR_KEY THEN NULL ELSE FLOOR_KEY END AS flid2, CASE WHEN orgname = 'zzz' THEN NULL ELSE orgname END AS dept, rmcnt, areasum, area_avg FROM (SELECT FLOOR_KEY AS flsort, CASE WHEN GROUPING(FLOOR_KEY) = 0 AND ... | N/A | [
{
"mapped_column": [
"FAC_FLOOR.FLOOR_KEY"
],
"nl_phrase": "floor key"
},
{
"mapped_column": [
"FCLT_ORGANIZATION.ORGANIZATION_NAME"
],
"nl_phrase": "department name"
},
{
"mapped_column": [
"BUILDINGS.BUILDING_NAME"
],
"nl_phrase": "Stata building"
},... | [
[
"FCLT_ORGANIZATION.FCLT_ORGANIZATION_KEY",
"FAC_ROOMS.ORGANIZATION_KEY"
],
[
"BUILDINGS.BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
]
] |
87 | dw | [
"FAC_ROOMS",
"FAC_ORGANIZATION",
"FAC_FLOOR",
"FAC_BUILDING",
"FAC_BUILDING_ADDRESS"
] | List each building key and floor key within the department of facilities, the number of rooms, total area, average area per floor, building name, access level, zip code, and city. Include subtotals for each building and a grand total across all buildings. The subtotals and grand total should not include zip code or cit... | SELECT DISTINCT tbltmp.blsort AS building_id, tbltmp.flsort AS floor_id, tbltmp.rmcnt AS total_rooms, tbltmp.areasum AS total_area, tbltmp.area_avg AS avg_area, fb.BUILDING_NAME_LONG AS building_name, fb.ACCESS_LEVEL_NAME AS access_level, CASE WHEN tbltmp.flsort IS NULL THEN NULL ELSE fba.POSTAL_CODE END AS postal_code... | N/A | [
{
"mapped_column": [
"FAC_ROOMS.BUILDING_KEY"
],
"nl_phrase": "building key"
},
{
"mapped_column": [
"FAC_ROOMS.FLOOR_KEY"
],
"nl_phrase": "floor key"
},
{
"mapped_column": [
"FAC_ORGANIZATION.ORGANIZATION_NAME"
],
"nl_phrase": "department"
},
{
... | [
[
"FAC_ORGANIZATION.ORGANIZATION_KEY",
"FAC_ROOMS.ORGANIZATION_KEY"
]
] |
88 | dw | [
"LIBRARY_SUBJECT_OFFERED",
"LIBRARY_RESERVE_MATRL_DETAIL",
"LIBRARY_RESERVE_CATALOG",
"ACADEMIC_TERM_PARAMETER"
] | List the department, school, course number, subject title, total number of enrolled students, term code, and count of distinct catalog ISBNs. Add a summary row at the bottom showing the total number of students and distinct catalog ISBNs for the current term in the format of ('TOTAL:', null, null, null, total number of... | SELECT * FROM (SELECT OFFER_DEPT_NAME AS DEPT, OFFER_SCHOOL_NAME AS SCHOOL, COURSE_NUMBER AS COURSE_NR, SUBJECT_TITLE AS TITLE, SUM(NUM_ENROLLED_STUDENTS) AS TOTAL_ENROLLED, lso.TERM_CODE, COUNT(DISTINCT CATALOG_ISBN) AS OWNERSHIP FROM LIBRARY_SUBJECT_OFFERED lso JOIN LIBRARY_RESERVE_MATRL_DETAIL lrmd ON lrmd.LIBRARY_S... | N/A | [
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.OFFER_DEPT_NAME"
],
"nl_phrase": "department"
},
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.OFFER_SCHOOL_NAME"
],
"nl_phrase": "school"
},
{
"mapped_column": [
"LIBRARY_SUBJECT_OFFERED.COURSE_NUMBER"
],
"n... | [
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OFFERED_KEY",
"LIBRARY_SUBJECT_OFFERED.LIBRARY_SUBJECT_OFFERED_KEY"
],
[
"LIBRARY_RESERVE_CATALOG.LIBRARY_RESERVE_CATALOG_KEY",
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_RESERVE_CATALOG_KEY"
],
[
"LIBRARY_RESERVE_MATRL_DETAIL.LIBRARY_SUBJECT_OF... |
89 | dw | [
"MOIRA_LIST_OWNER",
"MOIRA_LIST_DETAIL",
"MOIRA_LIST",
"EMPLOYEE_DIRECTORY"
] | For each mailing list that involves subscribers that work in departments with names starting with 'Computer Science', state the ownership type, the list name, the number of owners, and the number of subscribers. Display the ownership type only if it differs from the previous entry. Include subtotals (the corresponding ... | SELECT CASE WHEN LAG(OWNERSHIP_TYPE) OVER (ORDER BY OWNERSHIP_TYPE_gr DESC, ML) = OWNERSHIP_TYPE THEN NULL ELSE OWNERSHIP_TYPE END AS OWNERSHIP_TYPE, ML, nr_owner, nr_member FROM (SELECT CASE WHEN OWNER_TYPE IS NULL AND MOIRA_LIST_NAME IS NOT NULL THEN CONCAT(OWNER_TYPE, '1') ELSE CONCAT(OWNER_TYPE, '2') END AS OWNERSH... | N/A | [
{
"mapped_column": [
"EMPLOYEE_DIRECTORY.DEPARTMENT_NAME"
],
"nl_phrase": "departments with names starting with 'Computer Science'"
},
{
"mapped_column": [
"MOIRA_LIST_OWNER.OWNER_TYPE"
],
"nl_phrase": "ownership type"
},
{
"mapped_column": [
"MOIRA_LIST.MOIRA_L... | [
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_OWNER_KEY",
"MOIRA_LIST_OWNER.MOIRA_LIST_OWNER_KEY"
],
[
"MOIRA_LIST_DETAIL.MOIRA_LIST_KEY",
"MOIRA_LIST.MOIRA_LIST_KEY"
],
[
"EMPLOYEE_DIRECTORY.MIT_ID",
"MOIRA_LIST_DETAIL.MOIRA_LIST_MEMBER_MIT_ID"
]
] |
90 | dw | [
"IAP_SUBJECT_CATEGORY",
"IAP_SUBJECT_DETAIL",
"IAP_SUBJECT_SESSION",
"IAP_SUBJECT_SPONSOR"
] | For each IAP category, list its name, number of unique sessions, total number of attendees, active period (in the format of 'beginning term code-end term code'), the most common sponsor name, and the most common session start time. Include a grand total row showing the total number of sessions and attendees across all ... | WITH SponsorAndStartTime AS (SELECT isc.IAP_CATEGORY_NAME, isp.SPONSOR_NAME, iss.SESSION_START_TIME, COUNT(isp.SPONSOR_NAME) AS sponsor_count, COUNT(iss.SESSION_START_TIME) AS start_time_count FROM IAP_SUBJECT_CATEGORY isc JOIN IAP_SUBJECT_DETAIL isd ON isd.IAP_SUBJECT_CATEGORY_KEY = isc.IAP_SUBJECT_CATEGORY_KEY LEFT J... | N/A | [
{
"mapped_column": [
"IAP_SUBJECT_CATEGORY.IAP_CATEGORY_NAME"
],
"nl_phrase": "name"
},
{
"mapped_column": [
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
"nl_phrase": "sessions"
},
{
"mapped_column": [
"IAP_SUBJECT_DETAIL.MAX_ENROLLMENT"
],
"nl_phras... | [
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_CATEGORY_KEY",
"IAP_SUBJECT_CATEGORY.IAP_SUBJECT_CATEGORY_KEY"
],
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SESSION_KEY",
"IAP_SUBJECT_SESSION.IAP_SUBJECT_SESSION_KEY"
],
[
"IAP_SUBJECT_DETAIL.IAP_SUBJECT_SPONSOR_KEY",
"IAP_SUBJECT_SPONSOR.IAP_SUBJECT_SPONSO... |
91 | dw | [
"FCLT_BUILDING_HIST",
"FAC_BUILDING_ADDRESS",
"BUILDINGS",
"FAC_ROOMS",
"EMPLOYEE_DIRECTORY"
] | For each building type, list the name of the building type, the number of buildings that are not subdivisions, number of employees, number of unique building street address, number of unique city, number of unique state, number of unique postal code, and average gross square footage per employee. For building type of '... | SELECT * FROM (SELECT CASE WHEN BUILDING_TYPE = 'RESIDENT' THEN 'RESIDENTIAL' ELSE BUILDING_TYPE END AS TYPE, COUNT(DISTINCT COALESCE(PARENT_BUILDING_NUMBER, FCLT_BUILDING_KEY)) AS BUILDINGS, COUNT(DISTINCT MIT_ID) AS MIT_ID_COUNT, COUNT(DISTINCT BUILDINGS.BUILDING_STREET_ADDRESS) AS ADDRESS_COUNT, COUNT(DISTINCT fac_b... | N/A | [
{
"mapped_column": [
"FCLT_BUILDING_HIST.BUILDING_TYPE"
],
"nl_phrase": "name of the building type"
},
{
"mapped_column": [
"FCLT_BUILDING_HIST.FCLT_BUILDING_KEY",
"FCLT_BUILDING_HIST.PARENT_BUILDING_NUMBER"
],
"nl_phrase": "buildings that are not subdivisions"
},
{... | [
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"FCLT_BUILDING_HIST.FCLT_BUILDING_KEY"
],
[
"FAC_BUILDING_ADDRESS.BUILDING_KEY",
"BUILDINGS.BUILDING_KEY"
],
[
"BUILDINGS.BUILDING_KEY",
"FAC_ROOMS.BUILDING_KEY"
],
[
"EMPLOYEE_DIRECTORY.OFFICE_LOCATION",
"FAC_ROOMS.FAC_ROOM_KEY"
]... |
ref bibtex
@article{chen2024beaver,
title={BEAVER: an enterprise benchmark for text-to-sql},
author={Chen, Peter Baile and Wenz, Fabian and Zhang, Yi and Yang, Devin and Choi, Justin and Tatbul, Nesime and Cafarella, Michael and Demiralp, {\c{C}}a{\u{g}}atay and Stonebraker, Michael},
journal={arXiv preprint arXiv:2409.02038},
year={2024}
}