human
Schema:
classroom (building, room_number, capacity)
department (dept_name, building, budget)
course (course_id, title, dept_name, credits)
instructor (ID, name, dept_name, salary)
section (course_id, sec_id, semester, year, building, room_number, time_slot_id)
teaches (ID, course_id, sec_id, semester, year)
student (ID, name, dept_name, tot_cred)
takes (ID, course_id, sec_id, semester, year, grade)
advisor (s_ID, i_ID)
time_slot (time_slot_id, day, start_hr, start_min, end_hr, end_min)
prereq (course_id, prereq_id)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the maximum capacity in Lambert? | Did you mean Lamberton? | yes. my apologies.
assistant
SELECT MAX( capacity ) FROM classroom WHERE building = 'Lamberton';
human
What is the maximum capacity of all of the rooms?
assistant
SELECT MAX( capacity ) FROM classroom;
human
How many rooms are there?
assistant
SELECT SUM( room_number ) FROM classroom;
human
What is the average capacity of the rooms?
assistant
SELECT AVG ( capacity ) FROM classroom;
human
Which classroom is the smallest?
assistant
SELECT * FROM classroom ORDER by capacity LIMIT 1;
human
What room seats 120 people?
assistant
SELECT * FROM classroom WHERE capacity = 120 ;