minktn/spider-data huggingface dataset:
Database: cre_Doc_Template_Mgt
Question: How many templates have template type code CV?
SQL: SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"
Database: cre_Doc_Template_Mgt
Question: Count the number of templates of the type CV.
SQL: SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"
Database: cre_Doc_Template_Mgt
Question: What is the version number and template type code for the template with version number later than 5?
SQL: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5
Database: cre_Doc_Template_Mgt
Question: Return the version numbers and template type codes of templates with a version number greater than 5.
SQL: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5
Database: cre_Doc_Template_Mgt
Question: Show all template type codes and number of templates for each.
SQL: SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code
Database: cre_Doc_Template_Mgt
Question: What are the different template type codes, and how many templates correspond to each?
SQL: SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code
Database: cre_Doc_Template_Mgt
Question: Which template type code has most number of templates?
SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Return the type code of the template type that the most templates belong to.
SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Show all template type codes with less than three templates.
SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3
Database: cre_Doc_Template_Mgt
Question: What are the codes of template types that have fewer than 3 templates?
SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3
Database: cre_Doc_Template_Mgt
Question: What the smallest version number and its template type code?
SQL: SELECT min(Version_Number) ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: Return the lowest version number, along with its corresponding template type code.
SQL: SELECT min(Version_Number) ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: What is the template type code of the template used by document with the name "Data base"?
SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"
Database: cre_Doc_Template_Mgt
Question: Return the template type code of the template that is used by a document named Data base.
SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"
Database: cre_Doc_Template_Mgt
Question: Show all document names using templates with template type code BK.
SQL: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"
Database: cre_Doc_Template_Mgt
Question: What are the names of documents that use templates with the code BK?
SQL: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"
Database: cre_Doc_Template_Mgt
Question: Show all template type codes and the number of documents using each type.
SQL: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
Database: cre_Doc_Template_Mgt
Question: What are the different template type codes, and how many documents use each type?
SQL: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
Database: cre_Doc_Template_Mgt
Question: Which template type code is used by most number of documents?
SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Return the code of the template type that is most commonly used in documents.
SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Show all template type codes that are not used by any document.
SQL: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
Database: cre_Doc_Template_Mgt
Question: What are the codes of template types that are not used for any document?
SQL: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
Database: cre_Doc_Template_Mgt
Question: Show all template type codes and descriptions.
SQL: SELECT template_type_code ,  template_type_description FROM Ref_template_types
Database: cre_Doc_Template_Mgt
Question: What are the type codes and descriptions for all template types?
SQL: SELECT template_type_code ,  template_type_description FROM Ref_template_types
Database: cre_Doc_Template_Mgt
Question: What is the template type descriptions for template type code "AD".
SQL: SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"
Database: cre_Doc_Template_Mgt
Question: Return the template type description of the template type with the code AD.
SQL: SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"
Database: cre_Doc_Template_Mgt
Question: What is the template type code for template type description "Book".
SQL: SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"
Database: cre_Doc_Template_Mgt
Question: Return the type code of the template type with the description "Book".
SQL: SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"
Database: cre_Doc_Template_Mgt
Question: What are the distinct template type descriptions for the templates ever used by any document?
SQL: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID
Database: cre_Doc_Template_Mgt
Question: Return the different descriptions for templates that have been used in a document.
SQL: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID
Database: cre_Doc_Template_Mgt
Question: What are the template ids with template type description "Presentation".
SQL: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"
Database: cre_Doc_Template_Mgt
Question: Return the ids corresponding to templates with the description 'Presentation'.
SQL: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"
Database: cre_Doc_Template_Mgt
Question: How many paragraphs in total?
SQL: SELECT count(*) FROM Paragraphs
Database: cre_Doc_Template_Mgt
Question: Count the number of paragraphs.
SQL: SELECT count(*) FROM Paragraphs
Database: cre_Doc_Template_Mgt
Question: How many paragraphs for the document with name 'Summer Show'?
SQL: SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'
Database: cre_Doc_Template_Mgt
Question: Count the number of paragraphs in the document named 'Summer Show'.
SQL: SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'
Database: cre_Doc_Template_Mgt
Question: Show paragraph details for paragraph with text 'Korea ' .
SQL: select other_details from paragraphs where paragraph_text like 'korea'
Database: cre_Doc_Template_Mgt
Question: What are the details for the paragraph that includes the text 'Korea ' ?
SQL: select other_details from paragraphs where paragraph_text like 'korea'
Database: cre_Doc_Template_Mgt
Question: Show all paragraph ids and texts for the document with name 'Welcome to NY'.
SQL: SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'
Database: cre_Doc_Template_Mgt
Question: What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?
SQL: SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'
Database: cre_Doc_Template_Mgt
Question: Show all paragraph texts for the document "Customer reviews".
SQL: SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"
Database: cre_Doc_Template_Mgt
Question: What are the paragraph texts for the document with the name 'Customer reviews'?
SQL: SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"
Database: cre_Doc_Template_Mgt
Question: Show all document ids and the number of paragraphs in each document. Order by document id.
SQL: SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id
Database: cre_Doc_Template_Mgt
Question: Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.
SQL: SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id
Database: cre_Doc_Template_Mgt
Question: Show all document ids, names and the number of paragraphs in each document.
SQL: SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id
Database: cre_Doc_Template_Mgt
Question: What are the ids and names of each document, as well as the number of paragraphs in each?
SQL: SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id
Database: cre_Doc_Template_Mgt
Question: List all document ids with at least two paragraphs.
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2
Database: cre_Doc_Template_Mgt
Question: What are the ids of documents that have 2 or more paragraphs?
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2
Database: cre_Doc_Template_Mgt
Question: What is the document id and name with greatest number of paragraphs?
SQL: SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Return the id and name of the document with the most paragraphs.
SQL: SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: What is the document id with least number of paragraphs?
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Return the id of the document with the fewest paragraphs.
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: What is the document id with 1 to 2 paragraphs?
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2
Database: cre_Doc_Template_Mgt
Question: Give the ids of documents that have between one and two paragraphs.
SQL: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2
Database: cre_Doc_Template_Mgt
Question: Show the document id with paragraph text 'Brazil' and 'Ireland'.
SQL: SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'
Database: cre_Doc_Template_Mgt
Question: What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?
SQL: SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'
Database: course_teach
Question: How many teachers are there?
SQL: SELECT count(*) FROM teacher
Database: course_teach
Question: What is the total count of teachers?
SQL: SELECT count(*) FROM teacher
Database: course_teach
Question: List the names of teachers in ascending order of age.
SQL: SELECT Name FROM teacher ORDER BY Age ASC
Database: course_teach
Question: What are the names of the teachers ordered by ascending age?
SQL: SELECT Name FROM teacher ORDER BY Age ASC
Database: course_teach
Question: What are the age and hometown of teachers?
SQL: SELECT Age ,  Hometown FROM teacher
Database: course_teach
Question: What is the age and hometown of every teacher?
SQL: SELECT Age ,  Hometown FROM teacher
Database: course_teach
Question: List the name of teachers whose hometown is not `` Little Lever Urban District '' .
SQL: select name from teacher where hometown != "little lever urban district"
Database: course_teach
Question: What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?
SQL: select name from teacher where hometown != "little lever urban district"
Database: course_teach
Question: Show the name of teachers aged either 32 or 33?
SQL: SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33
Database: course_teach
Question: What are the names of the teachers who are aged either 32 or 33?
SQL: SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33
Database: course_teach
Question: What is the hometown of the youngest teacher?
SQL: SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1
Database: course_teach
Question: Where is the youngest teacher from?
SQL: SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1
Database: course_teach
Question: Show different hometown of teachers and the number of teachers from each hometown.
SQL: SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown
Database: course_teach
Question: For each hometown, how many teachers are there?
SQL: SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown
Database: course_teach
Question: List the most common hometown of teachers.
SQL: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1
Database: course_teach
Question: What is the most commmon hometowns for teachers?
SQL: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1
Database: course_teach
Question: Show the hometowns shared by at least two teachers.
SQL: SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2
Database: course_teach
Question: What are the towns from which at least two teachers come from?
SQL: SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2
Database: course_teach
Question: Show names of teachers and the courses they are arranged to teach.
SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
Database: course_teach
Question: What is the name of each teacher and what course they teach?
SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
Database: course_teach
Question: Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID ORDER BY T3.Name
Database: course_teach
Question: What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?
SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID ORDER BY T3.Name
Database: course_teach
Question: Show the name of the teacher for the math course.
SQL: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID WHERE T2.Course  =  "Math"
Database: course_teach
Question: What are the names of the people who teach math courses?
SQL: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID WHERE T2.Course  =  "Math"
Database: course_teach
Question: Show names of teachers and the number of courses they teach.
SQL: SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
Database: course_teach
Question: What are the names of the teachers and how many courses do they teach?
SQL: SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
Database: course_teach
Question: Show names of teachers that teach at least two courses.
SQL: SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Database: course_teach
Question: What are the names of the teachers who teach at least two courses?
SQL: SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Database: course_teach
Question: List the names of teachers who have not been arranged to teach courses.
SQL: SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
Database: course_teach
Question: What are the names of the teachers whose courses have not been arranged?
SQL: SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
Database: museum_visit
Question: How many visitors below age 30 are there?
SQL: SELECT count(*) FROM visitor WHERE age  <  30
Database: museum_visit
Question: Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
SQL: SELECT name FROM visitor WHERE Level_of_membership  >  4 ORDER BY Level_of_membership DESC
Database: museum_visit
Question: What is the average age of the visitors whose membership level is not higher than 4?
SQL: SELECT avg(age) FROM visitor WHERE Level_of_membership  <=  4
Database: museum_visit
Question: Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.
SQL: SELECT name ,  Level_of_membership FROM visitor WHERE Level_of_membership  >  4 ORDER BY age DESC
Database: museum_visit
Question: Find the id and name of the museum that has the most staff members?
SQL: SELECT museum_id ,  name FROM museum ORDER BY num_of_staff DESC LIMIT 1
Database: museum_visit
Question: Find the average number of staff working for the museums that were open before 2009.
SQL: SELECT avg(num_of_staff) FROM museum WHERE open_year  <  2009
Database: museum_visit
Question: What are the opening year and staff number of the museum named Plaza Museum?
SQL: SELECT Num_of_Staff ,  Open_Year FROM museum WHERE name  =  'Plaza Museum'
Database: museum_visit
Question: find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.
SQL: SELECT name FROM museum WHERE num_of_staff  >  (SELECT min(num_of_staff) FROM museum WHERE open_year  >  2010)
Database: museum_visit
Question: find the id, name and age for visitors who visited some museums more than once.
SQL: SELECT t1.id ,  t1.name ,  t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id GROUP BY t1.id HAVING count(*)  >  1
Database: museum_visit
Question: What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?
SQL: SELECT t2.visitor_id ,  t1.name ,  t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1
Database: museum_visit
Question: What are the id and name of the museum visited most times?
SQL: SELECT t2.Museum_ID ,  t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID  =  t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1
Database: museum_visit
Question: What is the name of the museum that had no visitor yet?
SQL: SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)
Database: museum_visit
Question: Find the name and age of the visitor who bought the most tickets at once.
SQL: SELECT t1.name ,  t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1
Database: museum_visit
Question: What are the average and maximum number of tickets bought in all visits?
SQL: SELECT avg(num_of_ticket) ,  max(num_of_ticket) FROM visit
Database: museum_visit
Question: What is the total ticket expense of the visitors whose membership level is 1?
SQL: SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id WHERE t1.Level_of_membership  =  1
Database: museum_visit
Question: What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?
SQL: SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID  =  t2.Museum_ID WHERE t3.open_year  <  2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id  =  t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID  =  t2.Museum_ID WHERE t3.open_year  >  2011
Database: museum_visit
Question: Find the number of visitors who did not visit any museum opened after 2010.
SQL: SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID  =  t2.Museum_ID WHERE t1.open_year  >  2010)
Database: museum_visit
Question: How many museums were opened after 2013 or before 2008?
SQL: SELECT count(*) FROM museum WHERE open_year  >  2013 OR open_year  <  2008
Database: wta_1
Question: Find the total number of players.
SQL: SELECT count(*) FROM players
Database: wta_1
Question: How many players are there?
SQL: SELECT count(*) FROM players
Database: wta_1
Question: Find the total number of matches.
SQL: SELECT count(*) FROM matches
Database: wta_1
Question: Count the number of matches.
SQL: SELECT count(*) FROM matches
Database: wta_1
Question: List the first name and birth date of all players from the country with code USA.
SQL: SELECT first_name ,  birth_date FROM players WHERE country_code  =  'USA'
Database: wta_1
Question: What are the first names and birth dates of players from the USA?
SQL: SELECT first_name ,  birth_date FROM players WHERE country_code  =  'USA'
Database: wta_1
Question: Find the average age of losers and winners of all matches.
SQL: SELECT avg(loser_age) ,  avg(winner_age) FROM matches
Database: wta_1
Question: What are the average ages of losers and winners across matches?
SQL: SELECT avg(loser_age) ,  avg(winner_age) FROM matches
Database: wta_1
Question: Find the average rank of winners in all matches.
SQL: SELECT avg(winner_rank) FROM matches
Database: wta_1
Question: What is the average rank for winners in all matches?
SQL: SELECT avg(winner_rank) FROM matches
Database: wta_1
Question: Find the highest rank of losers in all matches.
SQL: SELECT min(loser_rank) FROM matches
Database: wta_1
Question: What is the best rank of losers across all matches?
SQL: SELECT min(loser_rank) FROM matches
Database: wta_1
Question: find the number of distinct country codes of all players.
SQL: SELECT count(DISTINCT country_code) FROM players
Database: wta_1
Question: How many distinct countries do players come from?
SQL: SELECT count(DISTINCT country_code) FROM players
Database: wta_1
Question: Find the number of distinct name of losers.
SQL: SELECT count(DISTINCT loser_name) FROM matches
Database: wta_1
Question: How many different loser names are there?
SQL: SELECT count(DISTINCT loser_name) FROM matches
Database: wta_1
Question: Find the name of tourney that has more than 10 matches.
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*)  >  10
Database: wta_1
Question: What are the names of tournaments that have more than 10 matches?
SQL: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*)  >  10
Database: wta_1
Question: List the names of all winners who played in both 2013 and 2016.
SQL: SELECT winner_name FROM matches WHERE YEAR  =  2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR  =  2016
Database: wta_1
Question: What are the names of players who won in both 2013 and 2016?
SQL: SELECT winner_name FROM matches WHERE YEAR  =  2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR  =  2016
Database: wta_1
Question: List the number of all matches who played in years of 2013 or 2016.
SQL: SELECT count(*) FROM matches WHERE YEAR  =  2013 OR YEAR  =  2016
Database: wta_1
Question: How many matches were played in 2013 or 2016?
SQL: SELECT count(*) FROM matches WHERE YEAR  =  2013 OR YEAR  =  2016
Database: wta_1
Question: What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?
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'
Database: wta_1
Question: What are the first names and country codes for players who won both the WTA Championships and the Australian Open?
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'
Database: wta_1
Question: Find the first name and country code of the oldest player.
SQL: SELECT first_name ,  country_code FROM players ORDER BY birth_date LIMIT 1
Database: wta_1
Question: What is the first name and country code of the oldest player?
SQL: SELECT first_name ,  country_code FROM players ORDER BY birth_date LIMIT 1
Database: wta_1
Question: List the first and last name of all players in the order of birth date.
SQL: SELECT first_name ,  last_name FROM players ORDER BY birth_date
Database: wta_1
Question: What are the full names of all players, sorted by birth date?
SQL: SELECT first_name ,  last_name FROM players ORDER BY birth_date
Database: wta_1
Question: List the first and last name of all players who are left / L hand in the order of birth date.
SQL: SELECT first_name ,  last_name FROM players WHERE hand  =  'L' ORDER BY birth_date
Database: wta_1
Question: What are the full names of all left handed players, in order of birth date?
SQL: SELECT first_name ,  last_name FROM players WHERE hand  =  'L' ORDER BY birth_date
Database: wta_1
Question: Find the first name and country code of the player who did the most number of tours.
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
Database: wta_1
Question: What is the first name and country code of the player with the most tours?
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
Database: wta_1
Question: Find the year that has the most number of matches.
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: Which year had the most matches?
SQL: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: Find the name and rank points of the winner who won the most times.
SQL: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: What is the name of the winner who has won the most matches, and how many rank points does this player have?
SQL: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
SQL: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
Database: wta_1
Question: What is the name of the winner with the most rank points who participated in the Australian Open tournament?
SQL: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
Database: wta_1
Question: find the names of loser and winner who played in the match with greatest number of minutes.
SQL: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1
Database: wta_1
Question: What are the names of the winner and loser who played in the longest match?
SQL: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1
Database: wta_1
Question: Find the average ranking for each player and their first name.
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
Database: wta_1
Question: What are the first names of all players, and their average rankings?
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
Database: wta_1
Question: Find the total ranking points for each player and their first name.
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
Database: wta_1
Question: What are the first names of all players, and their total ranking points?
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
Database: wta_1
Question: find the number of players for each country.
SQL: SELECT count(*) ,  country_code FROM players GROUP BY country_code
Database: wta_1
Question: How many players are from each country?
SQL: SELECT count(*) ,  country_code FROM players GROUP BY country_code
Database: wta_1
Question: find the code of the country where has the greatest number of players.
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: What is the code of the country with the most players?
SQL: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
Database: wta_1
Question: Find the codes of countries that have more than 50 players.
SQL: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50
Database: wta_1
Question: What are the codes of countries with more than 50 players?
SQL: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50
Database: wta_1
Question: Find the total number of tours for each ranking date.
SQL: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date
Database: wta_1
Question: How many total tours were there for each ranking date?
SQL: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date
Database: wta_1
Question: Find the number of matches happened in each year.
SQL: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR
Database: wta_1
Question: How many matches were played in each year?
SQL: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR
Database: wta_1
Question: Find the name and rank of the 3 youngest winners across all matches.
SQL: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3
Database: wta_1
Question: What are the names and ranks of the three youngest winners across all matches?
SQL: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3
Database: wta_1
Question: How many different winners both participated in the WTA Championships and were left handed?
SQL: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'
Database: wta_1
Question: Find the number of left handed winners who participated in the WTA Championships.
SQL: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'
Database: wta_1
Question: Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
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
Database: wta_1
Question: What is the first name, country code, and birth date of the player with the most winner rank points across all matches?
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
Database: wta_1
Question: Find the number of players for each hand type.
SQL: SELECT count(*) ,  hand FROM players GROUP BY hand
Database: wta_1
Question: How many players are there for each hand type?
SQL: SELECT count(*) ,  hand FROM players GROUP BY hand
Database: battle_death
Question: How many ships ended up being 'Captured'?
SQL: SELECT count(*) FROM ship WHERE disposition_of_ship  =  'Captured'
Database: battle_death
Question: List the name and tonnage ordered by in descending alphaetical order for the names.
SQL: SELECT name ,  tonnage FROM ship ORDER BY name DESC
Database: battle_death
Question: List the name, date and result of each battle.
SQL: SELECT name ,  date FROM battle
Database: battle_death
Question: What is maximum and minimum death toll caused each time?
SQL: SELECT max(killed) ,  min(killed) FROM death
Database: battle_death
Question: What is the average number of injuries caused each time?
SQL: SELECT avg(injured) FROM death
Database: battle_death
Question: What are the death and injury situations caused by the ship with tonnage 't'?
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'
Database: battle_death
Question: What are the name and results of the battles when the bulgarian commander is not 'Boril'
SQL: SELECT name ,  RESULT FROM battle WHERE bulgarian_commander != 'Boril'
Database: battle_death
Question: What are the different ids and names of the battles that lost any 'Brig' type shipes?
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'
Database: battle_death
Question: What are the ids and names of the battles that led to more than 10 people killed in total.
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
Database: battle_death
Question: What is the ship id and name that caused most total injuries?
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
Database: battle_death
Question: What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
SQL: SELECT name FROM battle WHERE bulgarian_commander  =  'Kaloyan' AND latin_commander  =  'Baldwin I'
Database: battle_death
Question: How many different results are there for the battles?
SQL: SELECT count(DISTINCT RESULT) FROM battle
Database: battle_death
Question: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
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'
Database: battle_death
Question: Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
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'
Database: battle_death
Question: What are the notes of the death events which has substring 'East'?
SQL: SELECT note FROM death WHERE note LIKE '%East%'
Database: student_transcripts_tracking
Question: what are all the addresses including line 1 and line 2?
SQL: SELECT line_1 ,  line_2 FROM addresses
Database: student_transcripts_tracking
Question: What is the first and second line for all addresses?
SQL: SELECT line_1 ,  line_2 FROM addresses
Database: student_transcripts_tracking
Question: How many courses in total are listed?
SQL: SELECT count(*) FROM Courses
Database: student_transcripts_tracking
Question: How many courses are there?
SQL: SELECT count(*) FROM Courses
Database: student_transcripts_tracking
Question: How is the math course described?
SQL: SELECT course_description FROM Courses WHERE course_name  =  'math'
Database: student_transcripts_tracking
Question: What are the descriptions for all the math courses?
SQL: SELECT course_description FROM Courses WHERE course_name  =  'math'
Database: student_transcripts_tracking
Question: What is the zip code of the address in the city Port Chelsea?
SQL: SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'
Database: student_transcripts_tracking
Question: What is the zip code for Port Chelsea?
SQL: SELECT zip_postcode FROM Addresses WHERE city  =  'Port Chelsea'
Database: student_transcripts_tracking
Question: Which department offers the most number of degrees? List department name and id.
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
Database: student_transcripts_tracking
Question: What is the name and id of the department with the most number of degrees ?
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
Database: student_transcripts_tracking
Question: How many departments offer any degree?
SQL: SELECT count(DISTINCT department_id) FROM Degree_Programs
Database: student_transcripts_tracking
Question: How many different departments offer degrees?
SQL: SELECT count(DISTINCT department_id) FROM Degree_Programs
Database: student_transcripts_tracking
Question: How many different degree names are offered?
SQL: SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
Database: student_transcripts_tracking
Question: How many different degrees are offered?
SQL: SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
Database: student_transcripts_tracking
Question: How many degrees does the engineering department offer?
SQL: SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'
Database: student_transcripts_tracking
Question: How many degrees does the engineering department have?
SQL: SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'
Database: student_transcripts_tracking
Question: What are the names and descriptions of all the sections?
SQL: SELECT section_name ,  section_description FROM Sections
Database: student_transcripts_tracking
Question: What are the names and descriptions for all the sections?
SQL: SELECT section_name ,  section_description FROM Sections
Database: student_transcripts_tracking
Question: What are the names and id of courses having at most 2 sections?
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
Database: student_transcripts_tracking
Question: What are the names and ids of every course with less than 2 sections?
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
Database: student_transcripts_tracking
Question: List the section_name in reversed lexicographical order.
SQL: SELECT section_name FROM Sections ORDER BY section_name DESC
Database: student_transcripts_tracking
Question: What are the names of the sections in reverse alphabetical order?
SQL: SELECT section_name FROM Sections ORDER BY section_name DESC
Database: student_transcripts_tracking
Question: What is the semester which most student registered in? Show both the name and the id.
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
Database: student_transcripts_tracking
Question: For each semester, what is the name and id of the one with the most students registered?
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
Database: student_transcripts_tracking
Question: What is the description of the department whose name has the substring the computer?
SQL: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
Database: student_transcripts_tracking
Question: What is the department description for the one whose name has the word computer?
SQL: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
Database: student_transcripts_tracking
Question: Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
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
Database: student_transcripts_tracking
Question: What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?
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
Database: student_transcripts_tracking
Question: Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
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'
Database: student_transcripts_tracking
Question: What are the first, middle, and last names for everybody enrolled in a Bachelors program?
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'
Database: student_transcripts_tracking
Question: Find the kind of program which most number of students are enrolled in?
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
Database: student_transcripts_tracking
Question: What is the degree summary name that has the most number of students enrolled?
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
Database: student_transcripts_tracking
Question: Find the program which most number of students are enrolled in. List both the id and the summary.
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
Database: student_transcripts_tracking
Question: What is the program id and the summary of the degree that has the most students enrolled?
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
Database: student_transcripts_tracking
Question: 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.
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
Database: student_transcripts_tracking
Question: 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?
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
Database: student_transcripts_tracking
Question: Which semesters do not have any student enrolled? List the semester name.
SQL: SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
Database: student_transcripts_tracking
Question: What is the name of the semester with no students enrolled?
SQL: SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
Database: student_transcripts_tracking
Question: What are all the course names of the courses which ever have students enrolled in?
SQL: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id
Database: student_transcripts_tracking
Question: What are the names of all courses that have some students enrolled?
SQL: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id
Database: student_transcripts_tracking
Question: What's the name of the course with most number of enrollments?
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
Database: student_transcripts_tracking
Question: What is the name of the course with the most students enrolled?
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
Database: student_transcripts_tracking
Question: Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
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