column_names: -1
*
0
address id
0
line 1
0
line 2
0
line 3
0
city
0
zip postcode
0
state province county
0
country
0
other address details
1
course id
1
course name
1
course description
1
other details
2
department id
2
department name
2
department description
2
other details
3
degree program id
3
department id
3
degree summary name
3
degree summary description
3
other details
4
section id
4
course id
4
section name
4
section description
4
other details
5
semester id
5
semester name
5
semester description
5
other details
6
student id
6
current address id
6
permanent address id
6
first name
6
middle name
6
last name
6
cell mobile number
6
email address
6
ssn
6
date first registered
6
date left
6
other student details
7
student enrolment id
7
degree program id
7
semester id
7
student id
7
other details
8
student course id
8
course id
8
student enrolment id
9
transcript id
9
transcript date
9
other details
10
student course id
10
transcript id
column_names_original: -1
*
0
address_id
0
line_1
0
line_2
0
line_3
0
city
0
zip_postcode
0
state_province_county
0
country
0
other_address_details
1
course_id
1
course_name
1
course_description
1
other_details
2
department_id
2
department_name
2
department_description
2
other_details
3
degree_program_id
3
department_id
3
degree_summary_name
3
degree_summary_description
3
other_details
4
section_id
4
course_id
4
section_name
4
section_description
4
other_details
5
semester_id
5
semester_name
5
semester_description
5
other_details
6
student_id
6
current_address_id
6
permanent_address_id
6
first_name
6
middle_name
6
last_name
6
cell_mobile_number
6
email_address
6
ssn
6
date_first_registered
6
date_left
6
other_student_details
7
student_enrolment_id
7
degree_program_id
7
semester_id
7
student_id
7
other_details
8
student_course_id
8
course_id
8
student_enrolment_id
9
transcript_id
9
transcript_date
9
other_details
10
student_course_id
10
transcript_id
column_types: text
number
text
text
text
text
text
text
text
text
number
text
text
text
number
text
text
text
number
number
text
text
text
number
number
text
text
text
number
text
text
text
number
number
number
text
text
text
text
text
text
time
time
text
number
number
number
number
text
number
number
number
number
time
text
number
number
db_id: student_transcripts_tracking
table_names: addresses
courses
departments
degree programs
sections
semesters
students
student enrolment
student enrolment courses
transcripts
transcript contents
table_names_original: Addresses
Courses
Departments
Degree_Programs
Sections
Semesters
Students
Student_Enrolment
Student_Enrolment_Courses
Transcripts
Transcript_Contents

what are all the addresses including line 1 and line 2?
SELECT line_1 ,  line_2 FROM addresses

What is the first and second line for all addresses?
SELECT line_1 ,  line_2 FROM addresses

How many courses in total are listed?
SELECT count(*) FROM Courses

How many courses are there?
SELECT count(*) FROM Courses

How is the math course described?
SELECT course_description FROM Courses WHERE course_name  =  'math'

What are the descriptions for all the math courses?
SELECT course_description FROM Courses WHERE course_name  =  'math'

What is the zip code of the address in the city Port Chelsea?
SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'

What is the zip code for Port Chelsea?
SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'

Which department offers the most number of degrees? List department name and id.
SELECT T2.department_name ,  T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1

What is the name and id of the department with the most number of degrees ?
select t2.department_name ,  t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id  =  t2.department_id group by t1.department_id order by count(*) desc limit 1

How many departments offer any degree?
SELECT count(DISTINCT department_id) FROM Degree_Programs

How many different departments offer degrees?
SELECT count(DISTINCT department_id) FROM Degree_Programs

How many different degree names are offered?
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs

How many different degrees are offered?
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs

How many degrees does the engineering department offer?
SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'

How many degrees does the engineering department have?
SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'

What are the names and descriptions of all the sections?
SELECT section_name ,  section_description FROM Sections

What are the names and descriptions for all the sections?
SELECT section_name ,  section_description FROM Sections

What are the names and id of courses having at most 2 sections?
SELECT T1.course_name ,  T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_id HAVING count(*)  <=  2

What are the names and ids of every course with less than 2 sections?
SELECT T1.course_name ,  T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_id HAVING count(*)  <=  2

List the section_name in reversed lexicographical order.
SELECT section_name FROM Sections ORDER BY section_name DESC

What are the names of the sections in reverse alphabetical order?
SELECT section_name FROM Sections ORDER BY section_name DESC

What is the semester which most student registered in? Show both the name and the id.
SELECT T1.semester_name ,  T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id  =  T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1

For each semester, what is the name and id of the one with the most students registered?
SELECT T1.semester_name ,  T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id  =  T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1

What is the description of the department whose name has the substring the computer?
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'

What is the department description for the one whose name has the word computer?
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'

Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
SELECT T1.first_name ,  T1.middle_name ,  T1.last_name ,  T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  =  2

What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?
SELECT T1.first_name ,  T1.middle_name ,  T1.last_name ,  T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  =  2

Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
SELECT DISTINCT T1.first_name ,  T1.middle_name ,  T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id  =  T3.degree_program_id WHERE T3.degree_summary_name  =  'Bachelor'

What are the first, middle, and last names for everybody enrolled in a Bachelors program?
SELECT DISTINCT T1.first_name ,  T1.middle_name ,  T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id  =  T3.degree_program_id WHERE T3.degree_summary_name  =  'Bachelor'

Find the kind of program which most number of students are enrolled in?
SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1

What is the degree summary name that has the most number of students enrolled?
SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1

Find the program which most number of students are enrolled in. List both the id and the summary.
SELECT T1.degree_program_id ,  T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1

What is the program id and the summary of the degree that has the most students enrolled?
SELECT T1.degree_program_id ,  T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1

Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.
SELECT T1.student_id ,  T1.first_name ,  T1.middle_name ,  T1.last_name ,  count(*) ,  T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?
SELECT T1.student_id ,  T1.first_name ,  T1.middle_name ,  T1.last_name ,  count(*) ,  T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

Which semesters do not have any student enrolled? List the semester name.
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )

What is the name of the semester with no students enrolled?
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )

What are all the course names of the courses which ever have students enrolled in?
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id

What are the names of all courses that have some students enrolled?
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id

What's the name of the course with most number of enrollments?
SELECT  T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1

What is the name of the course with the most students enrolled?
SELECT  T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1

Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id  =  T2.address_id WHERE T2.state_province_county  =  'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id  =  T4.student_id

What are the last name of the students who live in North Carolina but have not registered in any degree programs?
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id  =  T2.address_id WHERE T2.state_province_county  =  'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id  =  T4.student_id

Show the date and id of the transcript with at least 2 course results.
SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id HAVING count(*)  >=  2

What is the date and id of the transcript with at least 2 courses listed?
SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id HAVING count(*)  >=  2

What is the phone number of the man with the first name Timmothy and the last name Ward?
SELECT cell_mobile_number FROM Students WHERE first_name  =  'Timmothy' AND last_name  =  'Ward'

What is the mobile phone number of the student named Timmothy Ward ?
select cell_mobile_number from students where first_name  =  'timmothy' and last_name  =  'ward'

Who is the first student to register? List the first name, middle name and last name.
SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1

What is the first, middle, and last name of the first student to register?
SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1

Who is the earliest graduate of the school? List the first name, middle name and last name.
SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_left ASC LIMIT 1

What is the first, middle, and last name of the earliest school graduate?
SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_left ASC LIMIT 1

Whose permanent address is different from his or her current address? List his or her first name.
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id

What is the first name of the student whose permanent address is different from his or her current one?
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id

Which address holds the most number of students currently? List the address id and all lines.
SELECT T1.address_id ,  T1.line_1 ,  T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1

What is the id, line 1, and line 2 of the address with the most students?
SELECT T1.address_id ,  T1.line_1 ,  T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1

On average, when were the transcripts printed?
SELECT avg(transcript_date) FROM Transcripts

What is the average transcript date?
SELECT avg(transcript_date) FROM Transcripts

When is the first transcript released? List the date and details.
SELECT transcript_date ,  other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1

What is the earliest date of a transcript release, and what details can you tell me?
SELECT transcript_date ,  other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1

How many transcripts are released?
SELECT count(*) FROM Transcripts

How many transcripts are listed?
SELECT count(*) FROM Transcripts

What is the last transcript release date?
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1

When was the last transcript released?
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1

How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
SELECT count(*) ,  student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1

What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?
SELECT count(*) ,  student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1

Show the date of the transcript which shows the least number of results, also list the id.
SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1

What is the date and id of the transcript with the least number of results?
SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1

Find the semester when both Master students and Bachelor students got enrolled in.
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Bachelor'

What is the id of the semester that had both Masters and Bachelors students enrolled?
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Bachelor'

How many different addresses do the students currently live?
SELECT count(DISTINCT current_address_id) FROM Students

What are the different addresses that have students living there?
SELECT count(DISTINCT current_address_id) FROM Students

List all the student details in reversed lexicographical order.
SELECT other_student_details FROM Students ORDER BY other_student_details DESC

What other details can you tell me about students in reverse alphabetical order?
SELECT other_student_details FROM Students ORDER BY other_student_details DESC

Describe the section h.
SELECT section_description FROM Sections WHERE section_name  =  'h'

What is the description for the section named h?
SELECT section_description FROM Sections WHERE section_name  =  'h'

Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id  =  t2.address_id where t2.country  =  'haiti' or t1.cell_mobile_number  =  '09700166582'

What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?
select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id  =  t2.address_id where t2.country  =  'haiti' or t1.cell_mobile_number  =  '09700166582'