cnatale/presto-athena-txt-2-sql huggingface dataset:
Count the number of matches.
Additional table information: table: wta_1
SQL: SELECT COUNT(*) FROM matches
List the first name and birth date of all players from the country with code USA.
Additional table information: table: wta_1
SQL: SELECT first_name, birth_date FROM players WHERE country_code = 'USA'
What are the first names and birth dates of players from the USA?
Additional table information: table: wta_1
SQL: SELECT first_name, birth_date FROM players WHERE country_code = 'USA'
Find the average age of losers and winners of all matches.
Additional table information: table: wta_1
SQL: SELECT AVG(loser_age), AVG(winner_age) FROM matches
What are the average ages of losers and winners across matches?
Additional table information: table: wta_1
SQL: SELECT AVG(loser_age), AVG(winner_age) FROM matches
Find the average rank of winners in all matches.
Additional table information: table: wta_1
SQL: SELECT AVG(winner_rank) FROM matches
What is the average rank for winners in all matches?
Additional table information: table: wta_1
SQL: SELECT AVG(winner_rank) FROM matches
Find the highest rank of losers in all matches.
Additional table information: table: wta_1
SQL: SELECT MIN(loser_rank) FROM matches
What is the best rank of losers across all matches?
Additional table information: table: wta_1
SQL: SELECT MIN(loser_rank) FROM matches
find the number of distinct country codes of all players.
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT country_code) FROM players
How many distinct countries do players come from?
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT country_code) FROM players
Find the number of distinct name of losers.
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT loser_name) FROM matches
How many different loser names are there?
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT loser_name) FROM matches
Find the name of tourney that has more than 10 matches.
Additional table information: table: wta_1
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10
What are the names of tournaments that have more than 10 matches?
Additional table information: table: wta_1
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10
List the names of all winners who played in both 2013 and 2016.
Additional table information: table: wta_1
SQL: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016
What are the names of players who won in both 2013 and 2016?
Additional table information: table: wta_1
SQL: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016
List the number of all matches who played in years of 2013 or 2016.
Additional table information: table: wta_1
SQL: SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
How many matches were played in 2013 or 2016?
Additional table information: table: wta_1
SQL: SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?
Additional table information: table: wta_1
SQL: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'
What are the first names and country codes for players who won both the WTA Championships and the Australian Open?
Additional table information: table: wta_1
SQL: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'
Find the first name and country code of the oldest player.
Additional table information: table: wta_1
SQL: SELECT first_name, country_code FROM players ORDER BY birth_date NULLS FIRST LIMIT 1
What is the first name and country code of the oldest player?
Additional table information: table: wta_1
SQL: SELECT first_name, country_code FROM players ORDER BY birth_date NULLS FIRST LIMIT 1
List the first and last name of all players in the order of birth date.
Additional table information: table: wta_1
SQL: SELECT first_name, last_name FROM players ORDER BY birth_date NULLS FIRST
What are the full names of all players, sorted by birth date?
Additional table information: table: wta_1
SQL: SELECT first_name, last_name FROM players ORDER BY birth_date NULLS FIRST
List the first and last name of all players who are left / L hand in the order of birth date.
Additional table information: table: wta_1
SQL: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date NULLS FIRST
What are the full names of all left handed players, in order of birth date?
Additional table information: table: wta_1
SQL: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date NULLS FIRST
Find the first name and country code of the player who did the most number of tours.
Additional table information: table: wta_1
SQL: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
What is the first name and country code of the player with the most tours?
Additional table information: table: wta_1
SQL: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
Find the year that has the most number of matches.
Additional table information: table: wta_1
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1
Which year had the most matches?
Additional table information: table: wta_1
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1
Find the name and rank points of the winner who won the most times.
Additional table information: table: wta_1
SQL: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the winner who has won the most matches, and how many rank points does this player have?
Additional table information: table: wta_1
SQL: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
Additional table information: table: wta_1
SQL: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
What is the name of the winner with the most rank points who participated in the Australian Open tournament?
Additional table information: table: wta_1
SQL: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
find the names of loser and winner who played in the match with greatest number of minutes.
Additional table information: table: wta_1
SQL: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1
What are the names of the winner and loser who played in the longest match?
Additional table information: table: wta_1
SQL: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1
Find the average ranking for each player and their first name.
Additional table information: table: wta_1
SQL: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
What are the first names of all players, and their average rankings?
Additional table information: table: wta_1
SQL: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
Find the total ranking points for each player and their first name.
Additional table information: table: wta_1
SQL: SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
What are the first names of all players, and their total ranking points?
Additional table information: table: wta_1
SQL: SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
find the number of players for each country.
Additional table information: table: wta_1
SQL: SELECT COUNT(*), country_code FROM players GROUP BY country_code
How many players are from each country?
Additional table information: table: wta_1
SQL: SELECT COUNT(*), country_code FROM players GROUP BY country_code
find the code of the country where has the greatest number of players.
Additional table information: table: wta_1
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1
What is the code of the country with the most players?
Additional table information: table: wta_1
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1
Find the codes of countries that have more than 50 players.
Additional table information: table: wta_1
SQL: SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50
What are the codes of countries with more than 50 players?
Additional table information: table: wta_1
SQL: SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50
Find the total number of tours for each ranking date.
Additional table information: table: wta_1
SQL: SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date
How many total tours were there for each ranking date?
Additional table information: table: wta_1
SQL: SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date
Find the number of matches happened in each year.
Additional table information: table: wta_1
SQL: SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR
How many matches were played in each year?
Additional table information: table: wta_1
SQL: SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR
Find the name and rank of the 3 youngest winners across all matches.
Additional table information: table: wta_1
SQL: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age NULLS FIRST LIMIT 3
What are the names and ranks of the three youngest winners across all matches?
Additional table information: table: wta_1
SQL: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age NULLS FIRST LIMIT 3
How many different winners both participated in the WTA Championships and were left handed?
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'
Find the number of left handed winners who participated in the WTA Championships.
Additional table information: table: wta_1
SQL: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'
Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
Additional table information: table: wta_1
SQL: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
What is the first name, country code, and birth date of the player with the most winner rank points across all matches?
Additional table information: table: wta_1
SQL: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
Find the number of players for each hand type.
Additional table information: table: wta_1
SQL: SELECT COUNT(*), hand FROM players GROUP BY hand
How many players are there for each hand type?
Additional table information: table: wta_1
SQL: SELECT COUNT(*), hand FROM players GROUP BY hand
How many ships ended up being 'Captured'?
Additional table information: table: battle_death
SQL: SELECT COUNT(*) FROM ship WHERE disposition_of_ship = 'Captured'
List the name and tonnage ordered by in descending alphaetical order for the names.
Additional table information: table: battle_death
SQL: SELECT name, tonnage FROM ship ORDER BY name DESC
List the name, date and result of each battle.
Additional table information: table: battle_death
SQL: SELECT name, date FROM battle
What is maximum and minimum death toll caused each time?
Additional table information: table: battle_death
SQL: SELECT MAX(killed), MIN(killed) FROM death
What is the average number of injuries caused each time?
Additional table information: table: battle_death
SQL: SELECT AVG(injured) FROM death
What are the death and injury situations caused by the ship with tonnage 't'?
Additional table information: table: battle_death
SQL: SELECT T1.killed, T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'
What are the name and results of the battles when the bulgarian commander is not 'Boril'
Additional table information: table: battle_death
SQL: SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril'
What are the different ids and names of the battles that lost any 'Brig' type shipes?
Additional table information: table: battle_death
SQL: SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'
What are the ids and names of the battles that led to more than 10 people killed in total.
Additional table information: table: battle_death
SQL: SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10
What is the ship id and name that caused most total injuries?
Additional table information: table: battle_death
SQL: 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 are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
Additional table information: table: battle_death
SQL: SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'
How many different results are there for the battles?
Additional table information: table: battle_death
SQL: SELECT COUNT(DISTINCT RESULT) FROM battle
How many battles did not lose any ship with tonnage '225'?
Additional table information: table: battle_death
SQL: SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225')
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
Additional table information: table: battle_death
SQL: 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'
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
Additional table information: table: battle_death
SQL: 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'
What are the notes of the death events which has substring 'East'?
Additional table information: table: battle_death
SQL: SELECT note FROM death WHERE note LIKE '%East%'
what are all the addresses including line 1 and line 2?
Additional table information: table: student_transcripts_tracking
SQL: SELECT line_1, line_2 FROM addresses
What is the first and second line for all addresses?
Additional table information: table: student_transcripts_tracking
SQL: SELECT line_1, line_2 FROM addresses
How many courses in total are listed?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*) FROM Courses
How many courses are there?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*) FROM Courses
How is the math course described?
Additional table information: table: student_transcripts_tracking
SQL: SELECT course_description FROM Courses WHERE course_name = 'math'
What are the descriptions for all the math courses?
Additional table information: table: student_transcripts_tracking
SQL: SELECT course_description FROM Courses WHERE course_name = 'math'
What is the zip code of the address in the city Port Chelsea?
Additional table information: table: student_transcripts_tracking
SQL: SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
What is the zip code for Port Chelsea?
Additional table information: table: student_transcripts_tracking
SQL: SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
Which department offers the most number of degrees? List department name and id.
Additional table information: table: student_transcripts_tracking
SQL: 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 ?
Additional table information: table: student_transcripts_tracking
SQL: SELECT t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC LIMIT 1
How many departments offer any degree?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs
How many different departments offer degrees?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs
How many different degree names are offered?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs
How many different degrees are offered?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs
How many degrees does the engineering department offer?
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'
What are the names and descriptions of all the sections?
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_name, section_description FROM Sections
What are the names and descriptions for all the sections?
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_name, section_description FROM Sections
What are the names and id of courses having at most 2 sections?
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) <= 2
List the section_name in reversed lexicographical order.
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_name FROM Sections ORDER BY section_name DESC
What are the names of the sections in reverse alphabetical order?
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_name FROM Sections ORDER BY section_name DESC
What is the semester which most student registered in? Show both the name and the id.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.semester_name, T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY COUNT(*) DESC LIMIT 1
What is the description of the department whose name has the substring the computer?
Additional table information: table: student_transcripts_tracking
SQL: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
What is the department description for the one whose name has the word computer?
Additional table information: table: student_transcripts_tracking
SQL: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT DISTINCT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'
Find the kind of program which most number of students are enrolled in?
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY COUNT(*) DESC LIMIT 1
Find the program which most number of students are enrolled in. List both the id and the summary.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1
Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
Which semesters do not have any student enrolled? List the semester name.
Additional table information: table: student_transcripts_tracking
SQL: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment)
What is the name of the semester with no students enrolled?
Additional table information: table: student_transcripts_tracking
SQL: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment)
What are all the course names of the courses which ever have students enrolled in?
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id
What's the name of the course with most number of enrollments?
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id
Show the date and id of the transcript with at least 2 course results.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2
What is the phone number of the man with the first name Timmothy and the last name Ward?
Additional table information: table: student_transcripts_tracking
SQL: 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 ?
Additional table information: table: student_transcripts_tracking
SQL: SELECT cell_mobile_number FROM students WHERE first_name = 'timmothy' AND last_name = 'ward'
Who is the first student to register? List the first name, middle name and last name.
Additional table information: table: student_transcripts_tracking
SQL: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered ASC NULLS FIRST LIMIT 1
What is the first, middle, and last name of the first student to register?
Additional table information: table: student_transcripts_tracking
SQL: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered ASC NULLS FIRST LIMIT 1
Who is the earliest graduate of the school? List the first name, middle name and last name.
Additional table information: table: student_transcripts_tracking
SQL: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC NULLS FIRST LIMIT 1
What is the first, middle, and last name of the earliest school graduate?
Additional table information: table: student_transcripts_tracking
SQL: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC NULLS FIRST LIMIT 1
Whose permanent address is different from his or her current address? List his or her first name.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id
Which address holds the most number of students currently? List the address id and all lines.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1
On average, when were the transcripts printed?
Additional table information: table: student_transcripts_tracking
SQL: SELECT AVG(transcript_date) FROM Transcripts
What is the average transcript date?
Additional table information: table: student_transcripts_tracking
SQL: SELECT AVG(transcript_date) FROM Transcripts
When is the first transcript released? List the date and details.
Additional table information: table: student_transcripts_tracking
SQL: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date ASC NULLS FIRST LIMIT 1
What is the earliest date of a transcript release, and what details can you tell me?
Additional table information: table: student_transcripts_tracking
SQL: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date ASC NULLS FIRST LIMIT 1
How many transcripts are released?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*) FROM Transcripts
How many transcripts are listed?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*) FROM Transcripts
What is the last transcript release date?
Additional table information: table: student_transcripts_tracking
SQL: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
When was the last transcript released?
Additional table information: table: student_transcripts_tracking
SQL: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1
Show the date of the transcript which shows the least number of results, also list the id.
Additional table information: table: student_transcripts_tracking
SQL: 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 NULLS FIRST LIMIT 1
What is the date and id of the transcript with the least number of results?
Additional table information: table: student_transcripts_tracking
SQL: 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 NULLS FIRST LIMIT 1
Find the semester when both Master students and Bachelor students got enrolled in.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'
How many different addresses do the students currently live?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT current_address_id) FROM Students
What are the different addresses that have students living there?
Additional table information: table: student_transcripts_tracking
SQL: SELECT COUNT(DISTINCT current_address_id) FROM Students
List all the student details in reversed lexicographical order.
Additional table information: table: student_transcripts_tracking
SQL: 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?
Additional table information: table: student_transcripts_tracking
SQL: SELECT other_student_details FROM Students ORDER BY other_student_details DESC
Describe the section h.
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_description FROM Sections WHERE section_name = 'h'
What is the description for the section named h?
Additional table information: table: student_transcripts_tracking
SQL: SELECT section_description FROM Sections WHERE section_name = 'h'
Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
Additional table information: table: student_transcripts_tracking
SQL: 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 ?
Additional table information: table: student_transcripts_tracking
SQL: 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'
List the title of all cartoons in alphabetical order.
Additional table information: table: tvshow
SQL: SELECT Title FROM Cartoon ORDER BY title NULLS FIRST
What are the titles of the cartoons sorted alphabetically?
Additional table information: table: tvshow
SQL: SELECT Title FROM Cartoon ORDER BY title NULLS FIRST
List all cartoon directed by 'Ben Jones'.
Additional table information: table: tvshow
SQL: SELECT Title FROM Cartoon WHERE Directed_by = 'Ben Jones'
What are the names of all cartoons directed by Ben Jones?
Additional table information: table: tvshow
SQL: SELECT Title FROM Cartoon WHERE Directed_by = 'Ben Jones'
How many cartoons were written by 'Joseph Kuhr'?
Additional table information: table: tvshow
SQL: SELECT COUNT(*) FROM Cartoon WHERE Written_by = 'Joseph Kuhr'
What is the number of cartoones written by Joseph Kuhr?
Additional table information: table: tvshow
SQL: SELECT COUNT(*) FROM Cartoon WHERE Written_by = 'Joseph Kuhr'
list all cartoon titles and their directors ordered by their air date
Additional table information: table: tvshow
SQL: SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date NULLS FIRST
What is the name and directors of all the cartoons that are ordered by air date?
Additional table information: table: tvshow
SQL: SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date NULLS FIRST
List the title of all cartoon directed by 'Ben Jones' or 'Brandon Vietti'.
Additional table information: table: tvshow
SQL: 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?
Additional table information: table: tvshow
SQL: SELECT Title FROM Cartoon WHERE Directed_by = 'Ben Jones' OR Directed_by = 'Brandon Vietti'
Which country has the most of TV Channels? List the country and number of TV Channels it has.
Additional table information: table: tvshow
SQL: 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?
Additional table information: table: tvshow
SQL: SELECT Country, COUNT(*) FROM TV_Channel GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
List the number of different series names and contents in the TV Channel table.
Additional table information: table: tvshow
SQL: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel
How many different series and contents are listed in the TV Channel table?
Additional table information: table: tvshow
SQL: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel
What is the content of TV Channel with serial name 'Sky Radio'?
Additional table information: table: tvshow
SQL: SELECT Content FROM TV_Channel WHERE series_name = 'Sky Radio'
What is the content of the series Sky Radio?
Additional table information: table: tvshow
SQL: SELECT Content FROM TV_Channel WHERE series_name = 'Sky Radio'
What is the Package Option of TV Channel with serial name 'Sky Radio'?
Additional table information: table: tvshow
SQL: SELECT Package_Option FROM TV_Channel WHERE series_name = 'Sky Radio'
What are the Package Options of the TV Channels whose series names are Sky Radio?
Additional table information: table: tvshow
SQL: SELECT Package_Option FROM TV_Channel WHERE series_name = 'Sky Radio'
How many TV Channel using language English?
Additional table information: table: tvshow
SQL: SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = 'English'
How many TV Channels use the English language?
Additional table information: table: tvshow
SQL: SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = 'English'
List the language used least number of TV Channel. List language and number of TV Channel.
Additional table information: table: tvshow
SQL: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
What are the languages used by the least number of TV Channels and how many channels use it?
Additional table information: table: tvshow
SQL: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
List each language and the number of TV Channels using it.
Additional table information: table: tvshow
SQL: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE
For each language, list the number of TV Channels that use it.
Additional table information: table: tvshow
SQL: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE
What is the TV Channel that shows the cartoon 'The Rise of the Blue Beetle!'? List the TV Channel's series name.
Additional table information: table: tvshow
SQL: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = 'The Rise of the Blue Beetle!'
What is the series name of the TV Channel that shows the cartoon 'The Rise of the Blue Beetle'?
Additional table information: table: tvshow
SQL: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = 'The Rise of the Blue Beetle!'
List the title of all  Cartoons showed on TV Channel with series name 'Sky Radio'.
Additional table information: table: tvshow
SQL: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'
What is the title of all the cartools that are on the TV Channel with the series name 'Sky Radio'?
Additional table information: table: tvshow
SQL: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'
List the Episode of all TV series sorted by rating.
Additional table information: table: tvshow
SQL: SELECT Episode FROM TV_series ORDER BY rating NULLS FIRST
What are all of the episodes ordered by ratings?
Additional table information: table: tvshow
SQL: SELECT Episode FROM TV_series ORDER BY rating NULLS FIRST
List top 3 highest Rating  TV series. List the TV series's Episode and Rating.
Additional table information: table: tvshow
SQL: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3
What are 3 most highly rated episodes in the TV series table and what were those ratings?
Additional table information: table: tvshow
SQL: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3
What is minimum and maximum share of TV series?
Additional table information: table: tvshow
SQL: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series
What is the maximum and minimum share for the TV series?
Additional table information: table: tvshow
SQL: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series
What is the air date of TV series with Episode 'A Love of a Lifetime'?
Additional table information: table: tvshow
SQL: SELECT Air_Date FROM TV_series WHERE Episode = 'A Love of a Lifetime'
When did the episode 'A Love of a Lifetime' air?
Additional table information: table: tvshow
SQL: SELECT Air_Date FROM TV_series WHERE Episode = 'A Love of a Lifetime'
What is Weekly Rank of TV series with Episode 'A Love of a Lifetime'?
Additional table information: table: tvshow
SQL: SELECT Weekly_Rank FROM TV_series WHERE Episode = 'A Love of a Lifetime'
What is the weekly rank for the episode 'A Love of a Lifetime'?
Additional table information: table: tvshow
SQL: SELECT Weekly_Rank FROM TV_series WHERE Episode = 'A Love of a Lifetime'
What is the TV Channel of TV series with Episode 'A Love of a Lifetime'? List the TV Channel's series name.
Additional table information: table: tvshow
SQL: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = 'A Love of a Lifetime'
What is the name of the series that has the episode 'A Love of a Lifetime'?
Additional table information: table: tvshow
SQL: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = 'A Love of a Lifetime'
List the Episode of all  TV series showed on TV Channel with series name 'Sky Radio'.
Additional table information: table: tvshow
SQL: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'
What is the episode for the TV series named 'Sky Radio'?
Additional table information: table: tvshow
SQL: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'
Find the number of cartoons directed by each of the listed directors.
Additional table information: table: tvshow
SQL: SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by
How many cartoons did each director create?
Additional table information: table: tvshow
SQL: SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by
Find the production code and channel of the most recently aired cartoon .
Additional table information: table: tvshow
SQL: SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1
What is the produdction code and channel of the most recent cartoon ?
Additional table information: table: tvshow
SQL: SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1
Find the package choice and series name of the TV channel that has high definition TV.
Additional table information: table: tvshow
SQL: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = 'yes'
What are the package options and the name of the series for the TV Channel that supports high definition TV?
Additional table information: table: tvshow
SQL: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = 'yes'
which countries' tv channels are playing some cartoon written by Todd Casey?
Additional table information: table: tvshow
SQL: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
What are the countries that have cartoons on TV that were written by Todd Casey?
Additional table information: table: tvshow
SQL: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
which countries' tv channels are not playing any cartoon written by Todd Casey?
Additional table information: table: tvshow
SQL: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
What are the countries that are not playing cartoons written by Todd Casey?
Additional table information: table: tvshow
SQL: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
Additional table information: table: tvshow
SQL: SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?
Additional table information: table: tvshow
SQL: SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
find the pixel aspect ratio and nation of the tv channels that do not use English.
Additional table information: table: tvshow
SQL: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English'
What is the pixel aspect ratio and country of origin for all TV channels that do not use English?
Additional table information: table: tvshow
SQL: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English'