target-benchmark/spider-queries huggingface dataset:
Database: assets_maintenance (tables: assets)
Question: What are all the distinct asset models?
SQL: SELECT DISTINCT asset_model FROM Assets
Database: assets_maintenance (tables: assets)
Question: List the all the assets make, model, details by the disposed date ascendingly.
SQL: SELECT asset_make ,  asset_model ,  asset_details FROM Assets ORDER BY asset_disposed_date ASC
Database: assets_maintenance (tables: parts)
Question: Which part has the least chargeable amount? List the part id and amount.
SQL: SELECT part_id ,  chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1
Database: assets_maintenance (tables: maintenance_contracts, third_party_companies)
Question: Which company started the earliest the maintenance contract? Show the company name.
SQL: SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id  =  T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1
Database: assets_maintenance (tables: staff)
Question: Which gender makes up the majority of the staff?
SQL: SELECT gender FROM staff GROUP BY gender ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance (tables: staff, engineer_visits)
Question: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.
SQL: SELECT T1.staff_name ,  count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id  =  T2.contact_staff_id GROUP BY T1.staff_name
Database: assets_maintenance (tables: assets, fault_log)
Question: Which assets did not incur any fault log? List the asset model.
SQL: SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log)
Database: station_weather (tables: station)
Question: list the local authorities and services provided by all stations.
SQL: SELECT local_authority ,  services FROM station
Database: station_weather (tables: train)
Question: show all train numbers and names ordered by their time from early to late.
SQL: SELECT train_number ,  name FROM train ORDER BY TIME
Database: station_weather (tables: train)
Question: Give me the times and numbers of all trains that go to Chennai, ordered by time.
SQL: SELECT TIME ,  train_number FROM train WHERE destination  =  'Chennai' ORDER BY TIME
Database: station_weather (tables: train)
Question: How many trains have 'Express' in their names?
SQL: SELECT count(*) FROM train WHERE name LIKE "%Express%"
Database: station_weather (tables: train)
Question: Find the number and time of the train that goes from Chennai to Guruvayur.
SQL: SELECT train_number ,  TIME FROM train WHERE origin  =  'Chennai' AND destination  =  'Guruvayur'
Database: station_weather (tables: train)
Question: Find the number of trains starting from each origin.
SQL: SELECT origin ,  count(*) FROM train GROUP BY origin
Database: station_weather (tables: route, train)
Question: Find the name of the train whose route runs through greatest number of stations.
SQL: SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id  =  t2.train_id GROUP BY t2.train_id ORDER BY count(*) DESC LIMIT 1
Database: station_weather (tables: route, station)
Question: Find the number of trains for each station, as well as the station network name and services.
SQL: SELECT count(*) ,  t1.network_name ,  t1.services FROM station AS t1 JOIN route AS t2 ON t1.id  =  t2.station_id GROUP BY t2.station_id
Database: station_weather (tables: weekly_weather)
Question: What is the average high temperature for each day of week?
SQL: SELECT avg(high_temperature) ,  day_of_week FROM weekly_weather GROUP BY day_of_week
Database: station_weather (tables: weekly_weather, station)
Question: Give me the maximum low temperature and average precipitation at the Amersham station.
SQL: SELECT max(t1.low_temperature) ,  avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id WHERE t2.network_name  =  "Amersham"
Database: station_weather (tables: route, train, station)
Question: Find names and times of trains that run through stations for the local authority Chiltern.
SQL: SELECT t3.name ,  t3.time FROM station AS t1 JOIN route AS t2 ON t1.id  =  t2.station_id JOIN train AS t3 ON t2.train_id  =  t3.id WHERE t1.local_authority  =  "Chiltern"
Database: station_weather (tables: station)
Question: How many different services are provided by all stations?
SQL: SELECT count(DISTINCT services) FROM station
Database: station_weather (tables: weekly_weather, station)
Question: Find the id and local authority of the station with has the highest average high temperature.
SQL: SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1
Database: station_weather (tables: weekly_weather, station)
Question: Find the id and local authority of the station whose maximum precipitation is higher than 50.
SQL: SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id HAVING max(t1.precipitation)  >  50
Database: station_weather (tables: weekly_weather)
Question: show the lowest low temperature and highest wind speed in miles per hour.
SQL: SELECT min(low_temperature) ,  max(wind_speed_mph) FROM weekly_weather
Database: station_weather (tables: train)
Question: Find the origins from which more than 1 train starts.
SQL: SELECT origin FROM train GROUP BY origin HAVING count(*)  >  1
Database: college_1 (tables: department, professor)
Question: Find the number of professors in accounting department.
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"
Database: college_1 (tables: department, professor)
Question: How many professors are in the accounting dept?
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"
Database: college_1 (tables: class)
Question: How many professors are teaching class with code ACCT-211?
SQL: SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"
Database: college_1 (tables: class)
Question: How many professors teach a class with the code ACCT-211?
SQL: SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"
Database: college_1 (tables: employee, department, professor)
Question: What is the first and last name of the professor in biology department?
SQL: SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"
Database: college_1 (tables: employee, department, professor)
Question: What are the first and last name of all biology professors?
SQL: SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"
Database: college_1 (tables: employee, class)
Question: What are the first names and date of birth of professors teaching course ACCT-211?
SQL: SELECT DISTINCT T1.EMP_FNAME ,  T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE CRS_CODE  =  "ACCT-211"
Database: college_1 (tables: employee, class)
Question: What are the first names and birthdates of the professors in charge of ACCT-211?
SQL: SELECT DISTINCT T1.EMP_FNAME ,  T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE CRS_CODE  =  "ACCT-211"
Database: college_1 (tables: employee, class)
Question: How many classes are professor whose last name is Graztevski has?
SQL: SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE T1.EMP_LNAME  =  'Graztevski'
Database: college_1 (tables: employee, class)
Question: How many classes does the professor whose last name is Graztevski teach?
SQL: SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE T1.EMP_LNAME  =  'Graztevski'
Database: college_1 (tables: department)
Question: What is the code of the school where the accounting department belongs to?
SQL: SELECT school_code FROM department WHERE dept_name  =  "Accounting"
Database: college_1 (tables: department)
Question: What is the school code of the accounting department?
SQL: SELECT school_code FROM department WHERE dept_name  =  "Accounting"
Database: college_1 (tables: course)
Question: How many credits does course CIS-220 have, and what its description?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'CIS-220'
Database: college_1 (tables: course)
Question: What is the description for the CIS-220 and how many credits does it have?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'CIS-220'
Database: college_1 (tables: department)
Question: what is the address of history department?
SQL: SELECT dept_address FROM department WHERE dept_name  =  'History'
Database: college_1 (tables: department)
Question: Where is the history department?
SQL: SELECT dept_address FROM department WHERE dept_name  =  'History'
Database: college_1 (tables: department)
Question: How many different locations does the school with code BUS has?
SQL: SELECT count(DISTINCT dept_address) FROM department WHERE school_code  =  'BUS'
Database: college_1 (tables: department)
Question: What are the different locations of the school with the code BUS?
SQL: SELECT count(DISTINCT dept_address) FROM department WHERE school_code  =  'BUS'
Database: college_1 (tables: department)
Question: How many different locations does each school have?
SQL: SELECT count(DISTINCT dept_address) ,  school_code FROM department GROUP BY school_code
Database: college_1 (tables: department)
Question: Count different addresses of each school.
SQL: SELECT count(DISTINCT dept_address) ,  school_code FROM department GROUP BY school_code
Database: college_1 (tables: course)
Question: Find the description and credit for the course QM-261?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'QM-261'
Database: college_1 (tables: course)
Question: What is the course description and number of credits for QM-261?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'QM-261'
Database: college_1 (tables: department)
Question: Find the number of departments in each school.
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code
Database: college_1 (tables: department)
Question: How many departments are in each school?
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code
Database: college_1 (tables: department)
Question: Find the number of different departments in each school whose number of different departments is less than 5.
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name)  <  5
Database: college_1 (tables: department)
Question: How many different departments are there in each school that has less than 5 apartments?
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name)  <  5
Database: college_1 (tables: class)
Question: How many sections does each course has?
SQL: SELECT count(*) ,  crs_code FROM CLASS GROUP BY crs_code
Database: college_1 (tables: class)
Question: How many sections does each course have?
SQL: SELECT count(*) ,  crs_code FROM CLASS GROUP BY crs_code
Database: college_1 (tables: course)
Question: What is the total credit does each department offer?
SQL: SELECT sum(crs_credit) ,  dept_code FROM course GROUP BY dept_code
Database: college_1 (tables: course)
Question: How many credits does the department offer?
SQL: SELECT sum(crs_credit) ,  dept_code FROM course GROUP BY dept_code
Database: college_1 (tables: class)
Question: Find the number of classes offered for all class rooms that held at least 2 classes.
SQL: SELECT count(*) ,  class_room FROM CLASS GROUP BY class_room HAVING count(*)  >=  2
Database: college_1 (tables: class)
Question: For each classroom with at least 2 classes, how many classes are offered?
SQL: SELECT count(*) ,  class_room FROM CLASS GROUP BY class_room HAVING count(*)  >=  2
Database: college_1 (tables: course, class)
Question: Find the number of classes in each department.
SQL: SELECT count(*) ,  dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY dept_code
Database: college_1 (tables: course, class)
Question: How many classes are held in each department?
SQL: SELECT count(*) ,  dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY dept_code
Database: college_1 (tables: course, department, class)
Question: Find the number of classes in each school.
SQL: SELECT count(*) ,  T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T2.dept_code  =  T3.dept_code GROUP BY T3.school_code
Database: college_1 (tables: course, department, class)
Question: How many classes exist for each school?
SQL: SELECT count(*) ,  T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T2.dept_code  =  T3.dept_code GROUP BY T3.school_code
Database: college_1 (tables: department, professor)
Question: What is the number of professors for different school?
SQL: SELECT count(*) ,  T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code
Database: college_1 (tables: department, professor)
Question: How many different professors are there for the different schools?
SQL: SELECT count(*) ,  T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code
Database: college_1 (tables: employee)
Question: Find the count and code of the job has most employees.
SQL: SELECT emp_jobcode ,  count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: employee)
Question: What is the count and code of the job with the most employee?
SQL: SELECT emp_jobcode ,  count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: department, professor)
Question: Which school has the smallest amount of professors?
SQL: SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1
Database: college_1 (tables: department, professor)
Question: Which school has the fewest professors?
SQL: SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1
Database: college_1 (tables: professor)
Question: Find the number of professors with a Ph.D. degree in each department.
SQL: SELECT count(*) ,  dept_code FROM professor WHERE prof_high_degree  =  'Ph.D.' GROUP BY dept_code
Database: college_1 (tables: professor)
Question: How many professors have a Ph.D. in each department?
SQL: SELECT count(*) ,  dept_code FROM professor WHERE prof_high_degree  =  'Ph.D.' GROUP BY dept_code
Database: college_1 (tables: student)
Question: Find the number of students for each department.
SQL: SELECT count(*) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student)
Question: How many students are in each department?
SQL: SELECT count(*) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student)
Question: Find the total number of hours have done for all students in each department.
SQL: SELECT sum(stu_hrs) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student)
Question: How many hours do the students spend studying in each department?
SQL: SELECT sum(stu_hrs) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student)
Question: Find the max, average, and minimum gpa of all students in each department.
SQL: SELECT max(stu_gpa) ,  avg(stu_gpa) ,  min(stu_gpa) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student)
Question: What is the highest, lowest, and average student GPA for every department?
SQL: SELECT max(stu_gpa) ,  avg(stu_gpa) ,  min(stu_gpa) ,  dept_code FROM student GROUP BY dept_code
Database: college_1 (tables: student, department)
Question: What is the name and the average gpa of department whose students have the highest average gpa?
SQL: SELECT T2.dept_name ,  avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1
Database: college_1 (tables: student, department)
Question: Which department has the highest average student GPA, and what is the average gpa?
SQL: SELECT T2.dept_name ,  avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1
Database: college_1 (tables: department)
Question: how many schools exist in total?
SQL: SELECT count(DISTINCT school_code) FROM department
Database: college_1 (tables: department)
Question: How many schools are there in the department?
SQL: SELECT count(DISTINCT school_code) FROM department
Database: college_1 (tables: class)
Question: How many different classes are there?
SQL: SELECT count(DISTINCT class_code) FROM CLASS
Database: college_1 (tables: class)
Question: How many unique classes are offered?
SQL: SELECT count(DISTINCT class_code) FROM CLASS
Database: college_1 (tables: class)
Question: How many courses are offered?
SQL: SELECT count(DISTINCT crs_code) FROM CLASS
Database: college_1 (tables: class)
Question: What are the number of different course codes?
SQL: SELECT count(DISTINCT crs_code) FROM CLASS
Database: college_1 (tables: department)
Question: How many departments does the college has?
SQL: SELECT count(DISTINCT dept_name) FROM department
Database: college_1 (tables: department)
Question: How many different departments are there?
SQL: SELECT count(DISTINCT dept_name) FROM department
Database: college_1 (tables: course, department)
Question: How many courses are offered by the Computer Info. Systems department?
SQL: SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"
Database: college_1 (tables: course, department)
Question: How many courses does the department of Computer Information Systmes offer?
SQL: SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"
Database: college_1 (tables: class)
Question: How many sections does course ACCT-211 has?
SQL: SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code  =  'ACCT-211'
Database: college_1 (tables: class)
Question: What is the number of different class sections offered in the course ACCT-211?
SQL: SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code  =  'ACCT-211'
Database: college_1 (tables: course, class)
Question: Find the total credits of all classes offered by each department.
SQL: SELECT sum(T1.crs_credit) ,  T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY T1.dept_code
Database: college_1 (tables: course, class)
Question: What are the total number of credits offered by each department?
SQL: SELECT sum(T1.crs_credit) ,  T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY T1.dept_code
Database: college_1 (tables: course, department, class)
Question: Find the name of the department that offers the largest number of credits of all classes.
SQL: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1
Database: college_1 (tables: course, department, class)
Question: Which department offers the most credits all together?
SQL: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1
Database: college_1 (tables: enroll, class)
Question: How many students enrolled in class ACCT-211?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code WHERE T1.crs_code  =  'ACCT-211'
Database: college_1 (tables: enroll, class)
Question: What are the total number of students enrolled in ACCT-211?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code WHERE T1.crs_code  =  'ACCT-211'
Database: college_1 (tables: enroll, student, class)
Question: What is the first name of each student enrolled in class ACCT-211?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'
Database: college_1 (tables: enroll, student, class)
Question: What are the first names of all students in course ACCT-211?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'
Database: college_1 (tables: enroll, student, class)
Question: What is the first name of students enrolled in class ACCT-211 and got grade C?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211' AND T2.enroll_grade  =  'C'
Database: college_1 (tables: enroll, student, class)
Question: What are the first names of all students who took ACCT-211 and received a C?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211' AND T2.enroll_grade  =  'C'
Database: college_1 (tables: employee)
Question: Find the total number of employees.
SQL: SELECT count(*) FROM employee
Database: college_1 (tables: employee)
Question: How many employees are there all together?
SQL: SELECT count(*) FROM employee
Database: college_1 (tables: professor)
Question: How many professors do have a Ph.D. degree?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.'
Database: college_1 (tables: professor)
Question: What is the total number of professors with a Ph.D. ?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.'
Database: college_1 (tables: enroll, course, department, class)
Question: How many students are enrolled in the class taught by some professor from the accounting department?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code WHERE T4.dept_name  =  'Accounting'
Database: college_1 (tables: enroll, course, department, class)
Question: How many students are enrolled in some classes that are taught by an accounting professor?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code WHERE T4.dept_name  =  'Accounting'
Database: college_1 (tables: enroll, course, department, class)
Question: What is the name of the department that has the largest number of students enrolled?
SQL: SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: enroll, course, department, class)
Question: What is the name of the department with the most students enrolled?
SQL: SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: department)
Question: list names of all departments ordered by their names.
SQL: SELECT dept_name FROM department ORDER BY dept_name