output
stringlengths
18
577
instruction
stringlengths
16
224
input
stringclasses
160 values
SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
What is the ship id and name that caused most total injuries?
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT count(DISTINCT RESULT) FROM battle
How many different results are there for the battles?
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );
How many battles did not lose any ship with tonnage '225'?
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT note FROM death WHERE note LIKE '%East%'
What are the notes of the death events which has substring 'East'?
"Schema (values (type))": battle : id (number) , name (text) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (number) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (number) , id (number) , note (text) , killed (number) , injured (number) "Primary Keys": battle : id | ship : id | death : id "Foreign Keys": ship : lost_in_battle equals battle : id | death : caused_by_ship_id equals ship : id
SELECT line_1 , line_2 FROM addresses
what are all the addresses including line 1 and line 2?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT line_1 , line_2 FROM addresses
What is the first and second line for all addresses?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(*) FROM Courses
How many courses in total are listed?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(*) FROM Courses
How many courses are there?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT course_description FROM Courses WHERE course_name = 'math'
How is the math course described?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT course_description FROM Courses WHERE course_name = 'math'
What are the descriptions for all the math courses?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
What is the zip code of the address in the city Port Chelsea?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
What is the zip code for Port Chelsea?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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
Which department offers the most number of degrees? List department name and id.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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 ?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT department_id) FROM Degree_Programs
How many departments offer any degree?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT department_id) FROM Degree_Programs
How many different departments offer degrees?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
How many different degree names are offered?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
How many different degrees are offered?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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 offer?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_name , section_description FROM Sections
What are the names and descriptions of all the sections?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_name , section_description FROM Sections
What are the names and descriptions for all the sections?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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 id of courses having at most 2 sections?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_name FROM Sections ORDER BY section_name DESC
List the section_name in reversed lexicographical order.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_name FROM Sections ORDER BY section_name DESC
What are the names of the sections in reverse alphabetical order?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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
What is the semester which most student registered in? Show both the name and the id.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
What is the description of the department whose name has the substring the computer?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
What is the department description for the one whose name has the word computer?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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
Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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'
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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 kind of program which most number of students are enrolled in?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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
Find the program which most number of students are enrolled in. List both the id and the summary.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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
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.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
Which semesters do not have any student enrolled? List the semester name.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id
What are all the course names of the courses which ever have students enrolled in?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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's the name of the course with most number of enrollments?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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 HAVING count(*) >= 2
Show the date and id of the transcript with at least 2 course results.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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 HAVING count(*) >= 2
What is the date and id of the transcript with at least 2 courses listed?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'
What is the phone number of the man with the first name Timmothy and the last name Ward?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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 ?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1
Who is the first student to register? List the first name, middle name and last name.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1
Who is the earliest graduate of the school? List the first name, middle name and last name.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
Whose permanent address is different from his or her current address? List his or her first name.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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
Which address holds the most number of students currently? List the address id and all lines.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT avg(transcript_date) FROM Transcripts
On average, when were the transcripts printed?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT avg(transcript_date) FROM Transcripts
What is the average transcript date?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
When is the first transcript released? List the date and details.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(*) FROM Transcripts
How many transcripts are released?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(*) FROM Transcripts
How many transcripts are listed?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
What is the last transcript release date?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
When was the last transcript released?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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
Show the date of the transcript which shows the least number of results, also list the id.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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'
Find the semester when both Master students and Bachelor students got enrolled in.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT current_address_id) FROM Students
How many different addresses do the students currently live?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT count(DISTINCT current_address_id) FROM Students
What are the different addresses that have students living there?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT other_student_details FROM Students ORDER BY other_student_details DESC
List all the student details in reversed lexicographical order.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_description FROM Sections WHERE section_name = 'h'
Describe the section h.
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT section_description FROM Sections WHERE section_name = 'h'
What is the description for the section named h?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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'
Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
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 ?
"Schema (values (type))": Addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (number) , course_name (text) , course_description (text) , other_details (text) | Departments : department_id (number) , department_name (text) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (number) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (number) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (number) , semester_name (text) , semester_description (text) , other_details (text) | Students : student_id (number) , current_address_id (number) , permanent_address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (time) , date_left (time) , other_student_details (text) | Student_Enrolment : student_enrolment_id (number) , degree_program_id (number) , semester_id (number) , student_id (number) , other_details (text) | Student_Enrolment_Courses : student_course_id (number) , course_id (number) , student_enrolment_id (number) | Transcripts : transcript_id (number) , transcript_date (time) , other_details (text) | Transcript_Contents : student_course_id (number) , transcript_id (number) "Primary Keys": Addresses : address_id | Courses : course_id | Departments : department_id | Degree_Programs : degree_program_id | Sections : section_id | Semesters : semester_id | Students : student_id | Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : student_course_id | Transcripts : transcript_id "Foreign Keys": Degree_Programs : department_id equals Departments : department_id | Sections : course_id equals Courses : course_id | Students : permanent_address_id equals Addresses : address_id | Students : current_address_id equals Addresses : address_id | Student_Enrolment : student_id equals Students : student_id | Student_Enrolment : semester_id equals Semesters : semester_id | Student_Enrolment : degree_program_id equals Degree_Programs : degree_program_id | Student_Enrolment_Courses : student_enrolment_id equals Student_Enrolment : student_enrolment_id | Student_Enrolment_Courses : course_id equals Courses : course_id | Transcript_Contents : transcript_id equals Transcripts : transcript_id | Transcript_Contents : student_course_id equals Student_Enrolment_Courses : student_course_id
SELECT Title FROM Cartoon ORDER BY title
List the title of all cartoons in alphabetical order.
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Title FROM Cartoon ORDER BY title
What are the titles of the cartoons sorted alphabetically?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
List all cartoon directed by "Ben Jones".
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
What are the names of all cartoons directed by Ben Jones?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";
How many cartoons were written by "Joseph Kuhr"?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";
What is the number of cartoones written by Joseph Kuhr?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
list all cartoon titles and their directors ordered by their air date
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
What is the name and directors of all the cartoons that are ordered by air date?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";
List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";
What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;
Which country has the most of TV Channels? List the country and number of TV Channels it has.
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;
What is the country with the most number of TV Channels and how many does it have?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;
List the number of different series names and contents in the TV Channel table.
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;
How many different series and contents are listed in the TV Channel table?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio";
What is the content of TV Channel with serial name "Sky Radio"?
"Schema (values (type))": TV_Channel : id (text) , series_name (text) , Country (text) , Language (text) , Content (text) , Pixel_aspect_ratio_PAR (text) , Hight_definition_TV (text) , Pay_per_view_PPV (text) , Package_Option (text) | TV_series : id (number) , Episode (text) , Air_Date (text) , Rating (text) , Share (number) , 18_49_Rating_Share (text) , Viewers_m (text) , Weekly_Rank (number) , Channel (text) | Cartoon : id (number) , Title (text) , Directed_by (text) , Written_by (text) , Original_air_date (text) , Production_code (number) , Channel (text) "Primary Keys": TV_Channel : id | TV_series : id | Cartoon : id "Foreign Keys": TV_series : Channel equals TV_Channel : id | Cartoon : Channel equals TV_Channel : id