Question:
What is the average age of the dogs who have gone through any treatments?
Additional table information: table: dog_kennels

Answer: SELECT AVG(age) FROM Dogs WHERE dog_id IN (SELECT dog_id FROM Treatments)


Question:
What are the notes of the death events which has substring 'East'?
Additional table information: table: battle_death

Answer: SELECT note FROM death WHERE note LIKE '%East%'


Question:
Find the number of distinct type of pets.
Additional table information: table: pets_1

Answer: SELECT COUNT(DISTINCT pettype) FROM pets


Question:
What is the average age of the visitors whose membership level is not higher than 4?
Additional table information: table: museum_visit

Answer: SELECT AVG(age) FROM visitor WHERE Level_of_membership <= 4


Question:
How many templates have template type code CV?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(*) FROM Templates WHERE template_type_code = 'CV'


Question:
What are the regions that use English or Dutch?
Additional table information: table: world_1

Answer: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' OR T2.Language = 'Dutch'


Question:
What player played guard for toronto in 1996-97?
Additional table information: table: "canadian_football"."toronto"
columns: player, player_number, nationality, position, years_in_toronto, school_club_team

Answer: SELECT player FROM "canadian_football"."toronto" WHERE position = 'Guard' AND years_in_toronto = '1996-97'


Question:
What are the names of the employees who never received any evaluation?
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM employee WHERE NOT Employee_ID IN (SELECT Employee_ID FROM evaluation)


Question:
Which unique cities are in Asian countries where Chinese is the official language ?
Additional table information: table: world_1

Answer: SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = 'asia'


Question:
What is the description for the section named h?
Additional table information: table: student_transcripts_tracking

Answer: SELECT section_description FROM Sections WHERE section_name = 'h'


Question:
What is the abbreviation of the airilne has the fewest flights and what country is it in?
Additional table information: table: flight_2

Answer: SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) NULLS FIRST LIMIT 1


Question:
Which makers designed more than 3 car models? List full name and the id.
Additional table information: table: car_1

Answer: SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3


Question:
What are the countries having at least one car maker? List name and id.
Additional table information: table: car_1

Answer: SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1


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.
Additional table information: table: museum_visit

Answer: SELECT name, Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC


Question:
What is the record company used by the greatest number of orchestras?
Additional table information: table: orchestra

Answer: SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1


Question:
Count the number of flights departing from 'APG'.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = 'APG'


Question:
What are the names of nations where both English and French are official languages?
Additional table information: table: world_1

Answer: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'French' AND T2.IsOfficial = 'T'


Question:
What are airlines that have some flight departing from airport 'AHD'?
Additional table information: table: flight_2

Answer: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'AHD'


Question:
List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.
Additional table information: table: dog_kennels

Answer: SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'


Question:
What are the titles of the cartoons sorted alphabetically?
Additional table information: table: tvshow

Answer: SELECT Title FROM Cartoon ORDER BY title NULLS FIRST


Question:
What are the names and ids of all countries with at least one car maker?
Additional table information: table: car_1

Answer: SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1


Question:
What is the last name of the student who has a cat that is 3 years old?
Additional table information: table: pets_1

Answer: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'


Question:
how many cars were produced in 1980?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE YEAR = 1980


Question:
what are the different names of the singers that have sales more than 300000?
Additional table information: table: singer

Answer: SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000


Question:
Find the average weight for each pet type.
Additional table information: table: pets_1

Answer: SELECT AVG(weight), pettype FROM pets GROUP BY pettype


Question:
What is the money rank of the tallest poker player?
Additional table information: table: poker_player

Answer: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1


Question:
How much does the most expensive charge type costs?
Additional table information: table: dog_kennels

Answer: SELECT MAX(charge_amount) FROM Charges


Question:
Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
Additional table information: table: car_1

Answer: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1


Question:
How many people live in countries that do not speak English?
Additional table information: table: world_1

Answer: SELECT SUM(Population) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English')


Question:
What are the names of poker players, ordered ascending by the number of final tables they have made?
Additional table information: table: poker_player

Answer: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made NULLS FIRST


Question:
List the date of each treatment, together with the first name of the professional who operated it.
Additional table information: table: dog_kennels

Answer: SELECT T1.date_of_treatment, T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id


Question:
What is the first name and country code of the player with the most tours?
Additional table information: table: wta_1

Answer: 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


Question:
Find the average age of losers and winners of all matches.
Additional table information: table: wta_1

Answer: SELECT AVG(loser_age), AVG(winner_age) FROM matches


Question:
Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.
Additional table information: table: concert_singer

Answer: SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015


Question:
What are the total amount of numbers on the Toronto team in 2005-06?
Additional table information: table: "canadian_football"."players"
columns: player, player_number, nationality, Position, years_in_toronto, school_club_team

Answer: SELECT COUNT player_number FROM "canadian_football"."players" WHERE years_in_toronto = '2005-06'


Question:
What are the names of documents that use templates with the code BK?
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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'


Question:
Find the name, population and expected life length of asian country with the largest area?
Additional table information: table: world_1

Answer: SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = 'Asia' ORDER BY SurfaceArea DESC LIMIT 1


Question:
Which district has both stores with less than 3000 products and stores with more than 10000 products?
Additional table information: table: employee_hire_evaluation

Answer: SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000


Question:
What are the population, name and leader of the country with the largest area?
Additional table information: table: world_1

Answer: SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1


Question:
Return the names of the contestants whose names contain the substring 'Al' .
Additional table information: table: voter_1

Answer: SELECT contestant_name FROM contestants WHERE contestant_name LIKE '%al%'


Question:
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

Answer: 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'


Question:
What are the names of players who won in both 2013 and 2016?
Additional table information: table: wta_1

Answer: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016


Question:
What are the names of all courses that have some students enrolled?
Additional table information: table: student_transcripts_tracking

Answer: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id


Question:
What are the names and grades for each high schooler?
Additional table information: table: network_1

Answer: SELECT name, grade FROM Highschooler


Question:
Which airline has abbreviation 'UAL'?
Additional table information: table: flight_2

Answer: SELECT Airline FROM AIRLINES WHERE Abbreviation = 'UAL'


Question:
What is the template type code for template type description 'Book'.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Ref_template_types WHERE template_type_description = 'Book'


Question:
Find the arriving date and the departing date of the dogs that received a treatment.
Additional table information: table: dog_kennels

Answer: SELECT DISTINCT T1.date_arrived, T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id


Question:
When was the last transcript released?
Additional table information: table: student_transcripts_tracking

Answer: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1


Question:
What is the maker of the carr produced in the earliest year and what year was it?
Additional table information: table: car_1

Answer: SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA)


Question:
What is the description of the department whose name has the substring the computer?
Additional table information: table: student_transcripts_tracking

Answer: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'


Question:
Which grades have 4 or more high schoolers?
Additional table information: table: network_1

Answer: SELECT grade FROM Highschooler GROUP BY grade HAVING COUNT(*) >= 4


Question:
What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?
Additional table information: table: museum_visit

Answer: 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


Question:
Which dogs are of the rarest breed? Show their names and treatment dates.
Additional table information: table: dog_kennels

Answer: SELECT T1.name, T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1)


Question:
How many cartoons were written by 'Joseph Kuhr'?
Additional table information: table: tvshow

Answer: SELECT COUNT(*) FROM Cartoon WHERE Written_by = 'Joseph Kuhr'


Question:
Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id, COUNT(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id NULLS FIRST


Question:
List the Episode of all  TV series showed on TV Channel with series name 'Sky Radio'.
Additional table information: table: tvshow

Answer: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'


Question:
What are the names of conductors, ordered by age?
Additional table information: table: orchestra

Answer: SELECT Name FROM conductor ORDER BY Age ASC NULLS FIRST


Question:
What is the sname of every sing that does not have any song?
Additional table information: table: singer

Answer: SELECT Name FROM singer WHERE NOT Singer_ID IN (SELECT Singer_ID FROM song)


Question:
What is the total surface area of the continents Asia and Europe?
Additional table information: table: world_1

Answer: SELECT SUM(SurfaceArea) FROM country WHERE Continent = 'Asia' OR Continent = 'Europe'


Question:
What is the air date of TV series with Episode 'A Love of a Lifetime'?
Additional table information: table: tvshow

Answer: SELECT Air_Date FROM TV_series WHERE Episode = 'A Love of a Lifetime'


Question:
What are the paragraph texts for the document with the name 'Customer reviews'?
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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'


Question:
Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
Additional table information: table: course_teach

Answer: 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 NULLS FIRST


Question:
What are the names of the singers who are not French citizens?
Additional table information: table: singer

Answer: SELECT Name FROM singer WHERE Citizenship <> 'France'


Question:
What is the most common singer citizenship ?
Additional table information: table: singer

Answer: SELECT citizenship FROM singer GROUP BY citizenship ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the country codes of countries where people use languages other than English?
Additional table information: table: world_1

Answer: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> 'English'


Question:
What are the names of the singers that have more than one songs?
Additional table information: table: singer

Answer: SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1


Question:
Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.
Additional table information: table: car_1

Answer: SELECT T2.MakeId, T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT MIN(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3


Question:
What are the different template type codes, and how many documents use each type?
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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


Question:
Find the id of the pet owned by student whose last name is ‘Smith’.
Additional table information: table: pets_1

Answer: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'


Question:
Tell me the number of dogs that have not received any treatment .
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments)


Question:
Give the flight numbers of flights leaving from APG.
Additional table information: table: flight_2

Answer: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = 'APG'


Question:
What is the average horsepower of the cars before 1980?
Additional table information: table: car_1

Answer: SELECT AVG(horsepower) FROM CARS_DATA WHERE YEAR < 1980


Question:
For all of the 4 cylinder cars, which model has the most horsepower?
Additional table information: table: car_1

Answer: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1


Question:
Give the flight numbers of flights arriving in Aberdeen.
Additional table information: table: flight_2

Answer: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = 'Aberdeen'


Question:
How many professionals did not operate any treatment on dogs?
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM Professionals WHERE NOT professional_id IN (SELECT professional_id FROM Treatments)


Question:
What are 3 most highly rated episodes in the TV series table and what were those ratings?
Additional table information: table: tvshow

Answer: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3


Question:
What are the names of the teachers who teach at least two courses?
Additional table information: table: course_teach

Answer: 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


Question:
What are the African countries that have a  population less than any country in Asia?
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE Continent = 'Africa' AND population < (SELECT MAX(population) FROM country WHERE Continent = 'Asia')


Question:
How many flights land in Aberdeen or Abilene?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = 'Aberdeen' OR T2.city = 'Abilene'


Question:
Which flight numbers correspond to United Airlines flights?
Additional table information: table: flight_2

Answer: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = 'United Airlines'


Question:
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

Answer: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the names of properties that are either houses or apartments with more than 1 room?
Additional table information: table: real_estate_properties

Answer: SELECT property_name FROM Properties WHERE property_type_code = 'House' UNION SELECT property_name FROM Properties WHERE property_type_code = 'Apartment' AND room_count > 1


Question:
List the maximum weight and type for each type of pet.
Additional table information: table: pets_1

Answer: SELECT MAX(weight), petType FROM pets GROUP BY petType


Question:
Give the name, population, and head of state for the country that has the largest area.
Additional table information: table: world_1

Answer: SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1


Question:
Find the major and age of students who do not have a cat pet.
Additional table information: table: pets_1

Answer: SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')


Question:
Give the name of the student with the most likes.
Additional table information: table: network_1

Answer: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
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

Answer: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show all template ids and number of documents using each template.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id, COUNT(*) FROM Documents GROUP BY template_id


Question:
Find the number of shops in each location.
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(*), LOCATION FROM shop GROUP BY LOCATION


Question:
Find the total ranking points for each player and their first name.
Additional table information: table: wta_1

Answer: 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


Question:
How many dog pets are raised by female students?
Additional table information: table: pets_1

Answer: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'


Question:
What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?
Additional table information: table: car_1

Answer: SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 3 UNION SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country JOIN model_list AS t3 ON t2.id = t3.maker WHERE t3.model = 'fiat'


Question:
What are the full names of all left handed players, in order of birth date?
Additional table information: table: wta_1

Answer: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date NULLS FIRST


Question:
What are the minimum and maximum number of products across all the shops?
Additional table information: table: employee_hire_evaluation

Answer: SELECT MIN(Number_products), MAX(Number_products) FROM shop


Question:
How many different nationalities do conductors have?
Additional table information: table: orchestra

Answer: SELECT COUNT(DISTINCT Nationality) FROM conductor


Question:
What are the different template type codes?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT DISTINCT template_type_code FROM Templates


Question:
find the id of tv channels that do not play any cartoon directed by Ben Jones.
Additional table information: table: tvshow

Answer: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'


Question:
What are the opening year and staff number of the museum named Plaza Museum?
Additional table information: table: museum_visit

Answer: SELECT Num_of_Staff, Open_Year FROM museum WHERE name = 'Plaza Museum'


Question:
Return the names of the 3 most populated countries.
Additional table information: table: world_1

Answer: SELECT Name FROM country ORDER BY Population DESC LIMIT 3


Question:
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

Answer: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'


Question:
What is the maximum accelerate for different number of cylinders?
Additional table information: table: car_1

Answer: SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders


Question:
Find the names of employees who never won any award in the evaluation.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM employee WHERE NOT Employee_ID IN (SELECT Employee_ID FROM evaluation)


Question:
Which shops' number products is above the average? Give me the shop names.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM shop WHERE number_products > (SELECT AVG(number_products) FROM shop)


Question:
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

Answer: 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


Question:
Which languages are spoken by only one country in republic governments?
Additional table information: table: world_1

Answer: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = 'Republic' GROUP BY T2.Language HAVING COUNT(*) = 1


Question:
Show the name of teachers aged either 32 or 33?
Additional table information: table: course_teach

Answer: SELECT Name FROM teacher WHERE Age = 32 OR Age = 33


Question:
Which of the countries has the most car makers? List the country name.
Additional table information: table: car_1

Answer: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the codes of countries where Spanish is spoken by the largest percentage of people?
Additional table information: table: world_1

Answer: SELECT CountryCode, MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = 'Spanish' GROUP BY CountryCode


Question:
List the Episode of all TV series sorted by rating.
Additional table information: table: tvshow

Answer: SELECT Episode FROM TV_series ORDER BY rating NULLS FIRST


Question:
What are the languages used by the least number of TV Channels and how many channels use it?
Additional table information: table: tvshow

Answer: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1


Question:
What are each owner's first name, last name, and the size of their dog?
Additional table information: table: dog_kennels

Answer: SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id


Question:
Find the first name and gender of student who have more than one pet.
Additional table information: table: pets_1

Answer: SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1


Question:
Return the names of the 3 countries with the fewest people.
Additional table information: table: world_1

Answer: SELECT Name FROM country ORDER BY Population ASC NULLS FIRST LIMIT 3


Question:
Find the number of employees hired in each shop; show the shop name as well.
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(*), t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name


Question:
Show distinct names of singers that have songs with sales more than 300000.
Additional table information: table: singer

Answer: SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000


Question:
What type of pet is the youngest animal, and how much does it weigh?
Additional table information: table: pets_1

Answer: SELECT pettype, weight FROM pets ORDER BY pet_age NULLS FIRST LIMIT 1


Question:
Which airlines have departing flights from both APG and CVO airports?
Additional table information: table: flight_2

Answer: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'APG' INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'CVO'


Question:
Return the names of poker players sorted by their earnings descending.
Additional table information: table: poker_player

Answer: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC


Question:
What are the names of the stadiums without any concerts?
Additional table information: table: concert_singer

Answer: SELECT name FROM stadium WHERE NOT stadium_id IN (SELECT stadium_id FROM concert)


Question:
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

Answer: 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'


Question:
Return the record companies of orchestras, sorted descending by the years in which they were founded.
Additional table information: table: orchestra

Answer: SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC


Question:
What are the codes of template types that have fewer than 3 templates?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) < 3


Question:
For each hometown, how many teachers are there?
Additional table information: table: course_teach

Answer: SELECT Hometown, COUNT(*) FROM teacher GROUP BY Hometown


Question:
Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.
Additional table information: table: dog_kennels

Answer: SELECT role_code, street, city, state FROM professionals WHERE city LIKE '%West%'


Question:
Who is the player that wears number 42?
Additional table information: table: "canadian_football"."toronto"
columns: player, player_number, nationality, position, years_in_toronto, school_club_team

Answer: SELECT player FROM "canadian_football"."toronto" WHERE player_number = '42'


Question:
Which airlines have a flight with source airport AHD?
Additional table information: table: flight_2

Answer: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'AHD'


Question:
What are the names , themes , and number of singers for every concert ?
Additional table information: table: concert_singer

Answer: SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id


Question:
Show the names of conductors and the orchestras they have conducted.
Additional table information: table: orchestra

Answer: SELECT T1.Name, T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID


Question:
Show the names of high schoolers who have at least 3 friends.
Additional table information: table: network_1

Answer: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 3


Question:
What are the names of the contestants whose names are not 'Jessie Alloway'
Additional table information: table: voter_1

Answer: SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway'


Question:
Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.
Additional table information: table: dog_kennels

Answer: SELECT T1.owner_id, T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY SUM(T3.cost_of_treatment) DESC LIMIT 1


Question:
When is the first transcript released? List the date and details.
Additional table information: table: student_transcripts_tracking

Answer: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date ASC NULLS FIRST LIMIT 1


Question:
What is the average edispl of the cars of model volvo?
Additional table information: table: car_1

Answer: SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'


Question:
Which countries have either English or Dutch as an official language?
Additional table information: table: world_1

Answer: SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND IsOfficial = 'T' UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Dutch' AND IsOfficial = 'T'


Question:
How many different degrees are offered?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs


Question:
What is maximum and minimum death toll caused each time?
Additional table information: table: battle_death

Answer: SELECT MAX(killed), MIN(killed) FROM death


Question:
Return the names and surface areas of the 5 largest countries.
Additional table information: table: world_1

Answer: SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5


Question:
Find the abbreviation and country of the airline that has fewest number of flights?
Additional table information: table: flight_2

Answer: SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) NULLS FIRST LIMIT 1


Question:
What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
Additional table information: table: voter_1

Answer: SELECT T2.created, T2.state, T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'


Question:
What are the first names and birth dates of players from the USA?
Additional table information: table: wta_1

Answer: SELECT first_name, birth_date FROM players WHERE country_code = 'USA'


Question:
What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?
Additional table information: table: network_1

Answer: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING COUNT(*) >= 2


Question:
Count the number of friends Kyle has.
Additional table information: table: network_1

Answer: SELECT COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = 'Kyle'


Question:
Return the id of the document with the fewest paragraphs.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1


Question:
List the cost of each treatment and the corresponding treatment type description.
Additional table information: table: dog_kennels

Answer: SELECT T1.cost_of_treatment, T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code


Question:
find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
Additional table information: table: tvshow

Answer: SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')


Question:
How is the math course described?
Additional table information: table: student_transcripts_tracking

Answer: SELECT course_description FROM Courses WHERE course_name = 'math'


Question:
Which template type code is used by most number of documents?
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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


Question:
Give the airport code and airport name corresonding to the city Anthony.
Additional table information: table: flight_2

Answer: SELECT AirportCode, AirportName FROM AIRPORTS WHERE city = 'Anthony'


Question:
Return the template type code of the template that is used by a document named Data base.
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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'


Question:
Give the airline with abbreviation 'UAL'.
Additional table information: table: flight_2

Answer: SELECT Airline FROM AIRLINES WHERE Abbreviation = 'UAL'


Question:
What is the mobile phone number of the student named Timmothy Ward ?
Additional table information: table: student_transcripts_tracking

Answer: SELECT cell_mobile_number FROM students WHERE first_name = 'timmothy' AND last_name = 'ward'


Question:
How many flights depart from City Aberdeen?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = 'Aberdeen'


Question:
What is the name of the country with the most car makers?
Additional table information: table: car_1

Answer: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1


Question:
Which models are lighter than 3500 but not built by the 'Ford Motor Company'?
Additional table information: table: car_1

Answer: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company'


Question:
Which semesters do not have any student enrolled? List the semester name.
Additional table information: table: student_transcripts_tracking

Answer: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment)


Question:
What is the code of airport that has the highest number of flights?
Additional table information: table: flight_2

Answer: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) DESC LIMIT 1


Question:
Find the name and rank of the 3 youngest winners across all matches.
Additional table information: table: wta_1

Answer: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age NULLS FIRST LIMIT 3


Question:
Return the owner id, first name and last name of the owner who has the most dogs.
Additional table information: table: dog_kennels

Answer: SELECT T1.owner_id, T2.first_name, T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
For each continent, list its id, name, and how many countries it has?
Additional table information: table: car_1

Answer: SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId


Question:
What is the average rank for winners in all matches?
Additional table information: table: wta_1

Answer: SELECT AVG(winner_rank) FROM matches


Question:
Show all template type codes with less than three templates.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) < 3


Question:
What is the name of the conductor who has worked the greatest number of years?
Additional table information: table: orchestra

Answer: SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1


Question:
List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
Additional table information: table: voter_1

Answer: SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'


Question:
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

Answer: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'


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.
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
Find the number of matches happened in each year.
Additional table information: table: wta_1

Answer: SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR


Question:
Return the names of conductors that do not have the nationality 'USA'.
Additional table information: table: orchestra

Answer: SELECT Name FROM conductor WHERE Nationality <> 'USA'


Question:
What is the money rank of the poker player with the highest earnings?
Additional table information: table: poker_player

Answer: SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1


Question:
What are the first, middle, and last names for everybody enrolled in a Bachelors program?
Additional table information: table: student_transcripts_tracking

Answer: 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'


Question:
What are the average ages of losers and winners across matches?
Additional table information: table: wta_1

Answer: SELECT AVG(loser_age), AVG(winner_age) FROM matches


Question:
Return the id and type code of the template that is used for the greatest number of documents.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT T1.template_id, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is name of the country that speaks the largest number of languages?
Additional table information: table: world_1

Answer: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1


Question:
How many car makers are there in france?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'


Question:
What are the locations and names of all stations with capacity between 5000 and 10000?
Additional table information: table: concert_singer

Answer: SELECT LOCATION, name FROM stadium WHERE capacity BETWEEN 5000 AND 10000


Question:
List all cartoon directed by 'Ben Jones'.
Additional table information: table: tvshow

Answer: SELECT Title FROM Cartoon WHERE Directed_by = 'Ben Jones'


Question:
What is the accelerate of the car make amc hornet sportabout (sw)?
Additional table information: table: car_1

Answer: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'


Question:
What is the produdction code and channel of the most recent cartoon ?
Additional table information: table: tvshow

Answer: SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1


Question:
Show name, country, age for all singers ordered by age from the oldest to the youngest.
Additional table information: table: concert_singer

Answer: SELECT name, country, age FROM singer ORDER BY age DESC


Question:
How many different winners both participated in the WTA Championships and were left handed?
Additional table information: table: wta_1

Answer: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'


Question:
Please show the different record companies and the corresponding number of orchestras.
Additional table information: table: orchestra

Answer: SELECT Record_Company, COUNT(*) FROM orchestra GROUP BY Record_Company


Question:
Show all template type codes and the number of documents using each type.
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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


Question:
List the names of all winners who played in both 2013 and 2016.
Additional table information: table: wta_1

Answer: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016


Question:
What is the name and directors of all the cartoons that are ordered by air date?
Additional table information: table: tvshow

Answer: SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date NULLS FIRST


Question:
Return the codes of countries that do not speak English and do not have Republics for governments.
Additional table information: table: world_1

Answer: SELECT Code FROM country WHERE GovernmentForm <> 'Republic' EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = 'English'


Question:
Return the number of  airports.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM AIRPORTS


Question:
Find the name of the shops that do not hire any employee.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM hiring)


Question:
What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?
Additional table information: table: tvshow

Answer: SELECT Title FROM Cartoon WHERE Directed_by = 'Ben Jones' OR Directed_by = 'Brandon Vietti'


Question:
List the title of all cartoons in alphabetical order.
Additional table information: table: tvshow

Answer: SELECT Title FROM Cartoon ORDER BY title NULLS FIRST


Question:
Show the names of conductors that have conducted more than one orchestras.
Additional table information: table: orchestra

Answer: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1


Question:
Give the nationality that is most common across all people.
Additional table information: table: poker_player

Answer: SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are all different template ids used for documents, and how many times were each of them used?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id, COUNT(*) FROM Documents GROUP BY template_id


Question:
What is the name of the museum that had no visitor yet?
Additional table information: table: museum_visit

Answer: SELECT name FROM museum WHERE NOT Museum_ID IN (SELECT museum_id FROM visit)


Question:
What is the total population of Gelderland district?
Additional table information: table: world_1

Answer: SELECT SUM(Population) FROM city WHERE District = 'Gelderland'


Question:
Give me the id, role and email of the professionals who did not perform any treatment on dogs.
Additional table information: table: dog_kennels

Answer: SELECT professional_id, role_code, email_address FROM Professionals EXCEPT SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id


Question:
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

Answer: 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


Question:
What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.
Additional table information: table: dog_kennels

Answer: SELECT name, age, weight FROM Dogs WHERE abandoned_yn = 1


Question:
What are the distinct states and create time of all votes?
Additional table information: table: voter_1

Answer: SELECT DISTINCT state, created FROM votes


Question:
What are the template ids with template type description 'Presentation'.
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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'


Question:
What are the average and maximum number of tickets bought in all visits?
Additional table information: table: museum_visit

Answer: SELECT AVG(num_of_ticket), MAX(num_of_ticket) FROM visit


Question:
What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?
Additional table information: table: singer

Answer: SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955


Question:
What are the names of cities in Europe for which English is not the official language?
Additional table information: table: world_1

Answer: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND NOT T1.Name IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')


Question:
Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.
Additional table information: table: dog_kennels

Answer: SELECT T1.owner_id, T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Find the number of professionals who have not treated any dogs.
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM Professionals WHERE NOT professional_id IN (SELECT professional_id FROM Treatments)


Question:
What are the names and id of courses having at most 2 sections?
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
Count the number of templates.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(*) FROM Templates


Question:
Who owns the youngest dog? Give me his or her last name.
Additional table information: table: dog_kennels

Answer: SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = (SELECT MAX(age) FROM Dogs)


Question:
What are the first names of all players, and their total ranking points?
Additional table information: table: wta_1

Answer: 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


Question:
What is the name of the high schooler who has the greatest number of friends?
Additional table information: table: network_1

Answer: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the document id with 1 to 2 paragraphs?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) BETWEEN 1 AND 2


Question:
What are the email, cell phone and home phone of each professional?
Additional table information: table: dog_kennels

Answer: SELECT email_address, cell_number, home_phone FROM professionals


Question:
What is the date and id of the transcript with the least number of results?
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?
Additional table information: table: world_1

Answer: SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72


Question:
Find number of pets owned by students who are older than 20.
Additional table information: table: pets_1

Answer: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20


Question:
What is the total ticket expense of the visitors whose membership level is 1?
Additional table information: table: museum_visit

Answer: 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


Question:
Show the ids of high schoolers who have friends and are also liked by someone else.
Additional table information: table: network_1

Answer: SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes


Question:
Show different citizenships and the maximum net worth of singers of each citizenship.
Additional table information: table: singer

Answer: SELECT Citizenship, MAX(Net_Worth_Millions) FROM singer GROUP BY Citizenship


Question:
What is the airport name for airport 'AKO'?
Additional table information: table: flight_2

Answer: SELECT AirportName FROM AIRPORTS WHERE AirportCode = 'AKO'


Question:
Which grade has the most high schoolers?
Additional table information: table: network_1

Answer: SELECT grade FROM Highschooler GROUP BY grade ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the maximum and minimum share for the TV series?
Additional table information: table: tvshow

Answer: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series


Question:
Find the year that has the most number of matches.
Additional table information: table: wta_1

Answer: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1


Question:
Give the names of countries that are in Europe and have a population equal to 80000.
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE continent = 'Europe' AND Population = '80000'


Question:
Find the production code and channel of the most recently aired cartoon .
Additional table information: table: tvshow

Answer: SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1


Question:
What is the id and weight of every pet who is older than 1?
Additional table information: table: pets_1

Answer: SELECT petid, weight FROM pets WHERE pet_age > 1


Question:
Show name of all students who have some friends and also are liked by someone else.
Additional table information: table: network_1

Answer: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id


Question:
List the name of teachers whose hometown is not `` Little Lever Urban District '' .
Additional table information: table: course_teach

Answer: SELECT name FROM teacher WHERE hometown <> 'little lever urban district'


Question:
Which year has most number of concerts?
Additional table information: table: concert_singer

Answer: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1


Question:
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
Additional table information: table: voter_1

Answer: SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1


Question:
How many singers do we have?
Additional table information: table: concert_singer

Answer: SELECT COUNT(*) FROM singer


Question:
How many players are from each country?
Additional table information: table: wta_1

Answer: SELECT COUNT(*), country_code FROM players GROUP BY country_code


Question:
What are the different addresses that have students living there?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(DISTINCT current_address_id) FROM Students


Question:
Show ids for all templates not used by any document.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents


Question:
How many car models are produced by each maker ? Only list the count and the maker full name .
Additional table information: table: car_1

Answer: SELECT COUNT(*), t2.fullname FROM model_list AS t1 JOIN car_makers AS t2 ON t1.maker = t2.id GROUP BY t2.id


Question:
Which model of the car has the minimum horsepower?
Additional table information: table: car_1

Answer: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC NULLS FIRST LIMIT 1


Question:
What are years of founding for orchestras that have had more than a single performance?
Additional table information: table: orchestra

Answer: SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1


Question:
How many total tours were there for each ranking date?
Additional table information: table: wta_1

Answer: SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date


Question:
Where is the youngest teacher from?
Additional table information: table: course_teach

Answer: SELECT Hometown FROM teacher ORDER BY Age ASC NULLS FIRST LIMIT 1


Question:
Count the number of different nationalities.
Additional table information: table: poker_player

Answer: SELECT COUNT(DISTINCT Nationality) FROM people


Question:
How many available features are there in total?
Additional table information: table: real_estate_properties

Answer: SELECT COUNT(*) FROM Other_Available_Features


Question:
Find the codes of countries that have more than 50 players.
Additional table information: table: wta_1

Answer: SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50


Question:
Give the average life expectancy for countries in Africa which are republics?
Additional table information: table: world_1

Answer: SELECT AVG(LifeExpectancy) FROM country WHERE Continent = 'Africa' AND GovernmentForm = 'Republic'


Question:
What are the name of the countries where there is not a single car maker?
Additional table information: table: car_1

Answer: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country


Question:
Give me all the information about hiring.
Additional table information: table: employee_hire_evaluation

Answer: SELECT * FROM hiring


Question:
Find the name of airports which do not have any flight in and out.
Additional table information: table: flight_2

Answer: SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)


Question:
Find the make and production time of the cars that were produced in the earliest year?
Additional table information: table: car_1

Answer: SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA)


Question:
Find the last name of the student who has a cat that is age 3.
Additional table information: table: pets_1

Answer: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'


Question:
What is the name and capacity for the stadium with the highest average attendance?
Additional table information: table: concert_singer

Answer: SELECT name, capacity FROM stadium ORDER BY average DESC LIMIT 1


Question:
which countries' tv channels are playing some cartoon written by Todd Casey?
Additional table information: table: tvshow

Answer: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'


Question:
find the minimum and maximum number of products of all stores.
Additional table information: table: employee_hire_evaluation

Answer: SELECT MIN(Number_products), MAX(Number_products) FROM shop


Question:
Show countries where a singer above age 40 and a singer below 30 are from.
Additional table information: table: concert_singer

Answer: SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30


Question:
How many degrees does the engineering department have?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'


Question:
Sort employee names by their age in ascending order.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM employee ORDER BY age NULLS FIRST


Question:
What are the airline names and abbreviations for airlines in the USA?
Additional table information: table: flight_2

Answer: SELECT Airline, Abbreviation FROM AIRLINES WHERE Country = 'USA'


Question:
What is the average GNP and total population in all nations whose government is US territory?
Additional table information: table: world_1

Answer: SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = 'US Territory'


Question:
What are the id, role, and first name of the professionals who have performed two or more treatments?
Additional table information: table: dog_kennels

Answer: SELECT T1.professional_id, T1.role_code, T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2


Question:
Show location and name for all stadiums with a capacity between 5000 and 10000.
Additional table information: table: concert_singer

Answer: SELECT LOCATION, name FROM stadium WHERE capacity BETWEEN 5000 AND 10000


Question:
Find the kind of program which most number of students are enrolled in?
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
What are the name, independence year, and surface area of the country with the smallest population?
Additional table information: table: world_1

Answer: SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population NULLS FIRST LIMIT 1


Question:
find the number of distinct country codes of all players.
Additional table information: table: wta_1

Answer: SELECT COUNT(DISTINCT country_code) FROM players


Question:
What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?
Additional table information: table: concert_singer

Answer: SELECT name, country FROM singer WHERE song_name LIKE '%Hey%'


Question:
Give average earnings of poker players who are taller than 200.
Additional table information: table: poker_player

Answer: SELECT AVG(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200


Question:
find id of the tv channels that from the countries where have more than two tv channels.
Additional table information: table: tvshow

Answer: SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2


Question:
Return the number of likes that the high schooler named Kyle has.
Additional table information: table: network_1

Answer: SELECT COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = 'Kyle'


Question:
How many languages are spoken in Aruba?
Additional table information: table: world_1

Answer: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Aruba'


Question:
How many type of governments are in Africa?
Additional table information: table: world_1

Answer: SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = 'Africa'


Question:
What is the total number of languages used in Aruba?
Additional table information: table: world_1

Answer: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Aruba'


Question:
Return the type code of the template type with the description 'Book'.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Ref_template_types WHERE template_type_description = 'Book'


Question:
What are the names and ids of all makers with more than 3 models?
Additional table information: table: car_1

Answer: SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3


Question:
On average, when were the transcripts printed?
Additional table information: table: student_transcripts_tracking

Answer: SELECT AVG(transcript_date) FROM Transcripts


Question:
What are the population and life expectancies in Brazil?
Additional table information: table: world_1

Answer: SELECT Population, LifeExpectancy FROM country WHERE Name = 'Brazil'


Question:
What are the names and descriptions for all the sections?
Additional table information: table: student_transcripts_tracking

Answer: SELECT section_name, section_description FROM Sections


Question:
Show the names and grades of each high schooler.
Additional table information: table: network_1

Answer: SELECT name, grade FROM Highschooler


Question:
What is the continent name which Anguilla belongs to?
Additional table information: table: world_1

Answer: SELECT Continent FROM country WHERE Name = 'Anguilla'


Question:
What is the id and type code for the template used by the most documents?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT T1.template_id, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show names for all stadiums except for stadiums having a concert in year 2014.
Additional table information: table: concert_singer

Answer: SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014


Question:
What are the distinct template type descriptions for the templates ever used by any document?
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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


Question:
What is the document id with least number of paragraphs?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1


Question:
list all cartoon titles and their directors ordered by their air date
Additional table information: table: tvshow

Answer: SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date NULLS FIRST


Question:
How many schools did player number 3 play at?
Additional table information: table: "canadian_football"."toronto"
columns: player, player_number, nationality, position, years_in_toronto, school_club_team

Answer: SELECT COUNT school_club_team FROM "canadian_football"."toronto" WHERE player_number = '3'


Question:
Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.
Additional table information: table: dog_kennels

Answer: SELECT first_name, last_name, email_address FROM Owners WHERE state LIKE '%North%'


Question:
Find the first name of students who have both cat and dog pets .
Additional table information: table: pets_1

Answer: SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog'


Question:
Return the version numbers and template type codes of templates with a version number greater than 5.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT version_number, template_type_code FROM Templates WHERE version_number > 5


Question:
List each charge type and its amount.
Additional table information: table: dog_kennels

Answer: SELECT charge_type, charge_amount FROM Charges


Question:
What school/club team is Trey Johnson on?
Additional table information: table: "canadian_football"."players"
columns: player, player_number, nationality, Position, years_in_toronto, school_club_team

Answer: SELECT school_club_team FROM "canadian_football"."players" WHERE player = 'Trey Johnson'


Question:
what are all the addresses including line 1 and line 2?
Additional table information: table: student_transcripts_tracking

Answer: SELECT line_1, line_2 FROM addresses


Question:
How many countries has more than 2 car makers ?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2


Question:
List the names of teachers who have not been arranged to teach courses.
Additional table information: table: course_teach

Answer: SELECT Name FROM teacher WHERE NOT Teacher_id IN (SELECT Teacher_id FROM course_arrange)


Question:
What are the region and population of Angola?
Additional table information: table: world_1

Answer: SELECT Population, Region FROM country WHERE Name = 'Angola'


Question:
What is the area code in which the most voters voted?
Additional table information: table: voter_1

Answer: SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show all paragraph texts for the document 'Customer reviews'.
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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'


Question:
Show titles of songs and names of singers.
Additional table information: table: singer

Answer: SELECT T2.Title, T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID


Question:
What are the names of poker players?
Additional table information: table: poker_player

Answer: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID


Question:
What is the name of the singer who is worth the most?
Additional table information: table: singer

Answer: SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1


Question:
Find all airlines that have at least 10 flights.
Additional table information: table: flight_2

Answer: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) > 10


Question:
What airline serves the most flights?
Additional table information: table: flight_2

Answer: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show the names of high school students and their corresponding number of friends.
Additional table information: table: network_1

Answer: SELECT T2.name, COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id


Question:
Find the id and cell phone of the professionals who operate two or more types of treatments.
Additional table information: table: dog_kennels

Answer: SELECT T1.professional_id, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2


Question:
How many different addresses do the students currently live?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(DISTINCT current_address_id) FROM Students


Question:
What are the cost and treatment type description of each treatment?
Additional table information: table: dog_kennels

Answer: SELECT T1.cost_of_treatment, T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code


Question:
Return the maximum final tables made across all poker players who have earnings below 200000.
Additional table information: table: poker_player

Answer: SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000


Question:
Return the country codes for countries that do not speak English.
Additional table information: table: world_1

Answer: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = 'English'


Question:
What is the best rank of losers across all matches?
Additional table information: table: wta_1

Answer: SELECT MIN(loser_rank) FROM matches


Question:
Return the money rank of the player with the greatest earnings.
Additional table information: table: poker_player

Answer: SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1


Question:
How much surface area do the countires in the Carribean cover together?
Additional table information: table: world_1

Answer: SELECT SUM(SurfaceArea) FROM country WHERE Region = 'Caribbean'


Question:
List the names of the dogs of the rarest breed and the treatment dates of them.
Additional table information: table: dog_kennels

Answer: SELECT T1.name, T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1)


Question:
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

Answer: 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'


Question:
What is the first name and country code of the oldest player?
Additional table information: table: wta_1

Answer: SELECT first_name, country_code FROM players ORDER BY birth_date NULLS FIRST LIMIT 1


Question:
Which states have both owners and professionals living there?
Additional table information: table: dog_kennels

Answer: SELECT state FROM Owners INTERSECT SELECT state FROM Professionals


Question:
How many high schoolers are there?
Additional table information: table: network_1

Answer: SELECT COUNT(*) FROM Highschooler


Question:
Which department offers the most number of degrees? List department name and id.
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
Find the name of the makers that produced some cars in the year of 1970?
Additional table information: table: car_1

Answer: SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'


Question:
List all document ids with at least two paragraphs.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) >= 2


Question:
Find the number of left handed winners who participated in the WTA Championships.
Additional table information: table: wta_1

Answer: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'


Question:
What are the different template type codes, and how many templates correspond to each?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code, COUNT(*) FROM Templates GROUP BY template_type_code


Question:
What is the average age of all the dogs?
Additional table information: table: dog_kennels

Answer: SELECT AVG(age) FROM Dogs


Question:
Return the ids of templates that have the code PP or PPT.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id FROM Templates WHERE template_type_code = 'PP' OR template_type_code = 'PPT'


Question:
What is the horsepower of the car with the greatest accelerate?
Additional table information: table: car_1

Answer: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1


Question:
Which airports do not have departing or arriving flights?
Additional table information: table: flight_2

Answer: SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)


Question:
Find the average ranking for each player and their first name.
Additional table information: table: wta_1

Answer: 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


Question:
How many TV Channel using language English?
Additional table information: table: tvshow

Answer: SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = 'English'


Question:
How many different loser names are there?
Additional table information: table: wta_1

Answer: SELECT COUNT(DISTINCT loser_name) FROM matches


Question:
What is the smallest weight of the car produced with 8 cylinders on 1974 ?
Additional table information: table: car_1

Answer: SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974


Question:
Count the number of conductors.
Additional table information: table: orchestra

Answer: SELECT COUNT(*) FROM conductor


Question:
Which regions speak Dutch or English?
Additional table information: table: world_1

Answer: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' OR T2.Language = 'Dutch'


Question:
Find the id and name of the museum that has the most staff members?
Additional table information: table: museum_visit

Answer: SELECT museum_id, name FROM museum ORDER BY num_of_staff DESC LIMIT 1


Question:
Find the weight of the youngest dog.
Additional table information: table: pets_1

Answer: SELECT weight FROM pets ORDER BY pet_age NULLS FIRST LIMIT 1


Question:
What are the names of high schoolers who both have friends and are liked?
Additional table information: table: network_1

Answer: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id


Question:
List the name of singers that do not have any song.
Additional table information: table: singer

Answer: SELECT Name FROM singer WHERE NOT Singer_ID IN (SELECT Singer_ID FROM song)


Question:
Find the states where both owners and professionals live.
Additional table information: table: dog_kennels

Answer: SELECT state FROM Owners INTERSECT SELECT state FROM Professionals


Question:
Give the city and country for the Alton airport.
Additional table information: table: flight_2

Answer: SELECT City, Country FROM AIRPORTS WHERE AirportName = 'Alton'


Question:
What is the year that had the most concerts?
Additional table information: table: concert_singer

Answer: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1


Question:
What region does Angola belong to and what is its population?
Additional table information: table: world_1

Answer: SELECT Population, Region FROM country WHERE Name = 'Angola'


Question:
What is the zip code of the address in the city Port Chelsea?
Additional table information: table: student_transcripts_tracking

Answer: SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'


Question:
Which abbreviation corresponds to Jetblue Airways?
Additional table information: table: flight_2

Answer: SELECT Abbreviation FROM AIRLINES WHERE Airline = 'JetBlue Airways'


Question:
Which employee received the most awards in evaluations? Give me the employee name.
Additional table information: table: employee_hire_evaluation

Answer: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY COUNT(*) DESC LIMIT 1


Question:
Return the names and template ids for documents that contain the letter w in their description.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_name, template_id FROM Documents WHERE Document_Description LIKE '%w%'


Question:
What are the orchestras that do not have any performances?
Additional table information: table: orchestra

Answer: SELECT Orchestra FROM orchestra WHERE NOT Orchestra_ID IN (SELECT Orchestra_ID FROM performance)


Question:
What are names of countries with the top 3 largest population?
Additional table information: table: world_1

Answer: SELECT Name FROM country ORDER BY Population DESC LIMIT 3


Question:
What is the maximum accelerate for all the different cylinders?
Additional table information: table: car_1

Answer: SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders


Question:
What is minimum and maximum share of TV series?
Additional table information: table: tvshow

Answer: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series


Question:
What are the names of the teachers and how many courses do they teach?
Additional table information: table: course_teach

Answer: SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name


Question:
How much does the youngest dog weigh?
Additional table information: table: pets_1

Answer: SELECT weight FROM pets ORDER BY pet_age NULLS FIRST LIMIT 1


Question:
For model volvo, how many cylinders does the car with the least accelerate have?
Additional table information: table: car_1

Answer: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC NULLS FIRST LIMIT 1


Question:
How many TV Channels use the English language?
Additional table information: table: tvshow

Answer: SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = 'English'


Question:
Count the number of United Airlines flights arriving in ASY Airport.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = 'United Airlines' AND T2.DestAirport = 'ASY'


Question:
List the first name and birth date of all players from the country with code USA.
Additional table information: table: wta_1

Answer: SELECT first_name, birth_date FROM players WHERE country_code = 'USA'


Question:
Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?
Additional table information: table: car_1

Answer: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500


Question:
How many contestants did not get voted?
Additional table information: table: voter_1

Answer: SELECT COUNT(*) FROM contestants WHERE NOT contestant_number IN (SELECT contestant_number FROM votes)


Question:
Give the total surface area covered by countries in Asia or Europe.
Additional table information: table: world_1

Answer: SELECT SUM(SurfaceArea) FROM country WHERE Continent = 'Asia' OR Continent = 'Europe'


Question:
What is the count of singers?
Additional table information: table: singer

Answer: SELECT COUNT(*) FROM singer


Question:
What languages are only used by a single country with a republic government?
Additional table information: table: world_1

Answer: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = 'Republic' GROUP BY T2.Language HAVING COUNT(*) = 1


Question:
Return the number of airlines in the USA.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM AIRLINES WHERE Country = 'USA'


Question:
What is the total number of airlines?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM AIRLINES


Question:
Show names of teachers that teach at least two courses.
Additional table information: table: course_teach

Answer: 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


Question:
What are the contestant numbers and names of the contestants who had at least two votes?
Additional table information: table: voter_1

Answer: SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING COUNT(*) >= 2


Question:
Count the number of matches.
Additional table information: table: wta_1

Answer: SELECT COUNT(*) FROM matches


Question:
Which first names are used for professionals or owners but are not used as dog names?
Additional table information: table: dog_kennels

Answer: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs


Question:
Please show the most common citizenship of singers.
Additional table information: table: singer

Answer: SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the names of students who have no friends?
Additional table information: table: network_1

Answer: SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id


Question:
Find the average grade of all students who have some friends.
Additional table information: table: network_1

Answer: SELECT AVG(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)


Question:
Find the city with the largest population that uses English.
Additional table information: table: world_1

Answer: SELECT T1.Name, T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T1.Population DESC LIMIT 1


Question:
What school/club team is Amir Johnson on?
Additional table information: table: "canadian_football"."players"
columns: player, player_number, nationality, Position, years_in_toronto, school_club_team

Answer: SELECT school_club_team FROM "canadian_football"."players" WHERE player = 'Amir Johnson'


Question:
Which countries in europe have at least 3 car manufacturers?
Additional table information: table: car_1

Answer: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3


Question:
What are the manager name and district of the shop that sells the largest number of products?
Additional table information: table: employee_hire_evaluation

Answer: SELECT manager_name, district FROM shop ORDER BY number_products DESC LIMIT 1


Question:
What is the average edispl for all volvos?
Additional table information: table: car_1

Answer: SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'


Question:
Which language is spoken by the largest number of countries?
Additional table information: table: world_1

Answer: SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the name of the shop that is hiring the largest number of employees?
Additional table information: table: employee_hire_evaluation

Answer: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are the countries that have cartoons on TV that were written by Todd Casey?
Additional table information: table: tvshow

Answer: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'


Question:
What is the number of nations that use English and Dutch?
Additional table information: table: world_1

Answer: SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Dutch')


Question:
Which country does Airline 'JetBlue Airways' belong to?
Additional table information: table: flight_2

Answer: SELECT Country FROM AIRLINES WHERE Airline = 'JetBlue Airways'


Question:
What are each professional's first name and description of the treatment they have performed?
Additional table information: table: dog_kennels

Answer: SELECT DISTINCT T1.first_name, T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code


Question:
Return the number of flights.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS


Question:
List the section_name in reversed lexicographical order.
Additional table information: table: student_transcripts_tracking

Answer: SELECT section_name FROM Sections ORDER BY section_name DESC


Question:
What is the name of the semester with no students enrolled?
Additional table information: table: student_transcripts_tracking

Answer: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment)


Question:
Return the money rank of the poker player with the greatest height.
Additional table information: table: poker_player

Answer: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1


Question:
What are the name, population, and life expectancy of the largest Asian country by land?
Additional table information: table: world_1

Answer: SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = 'Asia' ORDER BY SurfaceArea DESC LIMIT 1


Question:
List the title of all  Cartoons showed on TV Channel with series name 'Sky Radio'.
Additional table information: table: tvshow

Answer: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = 'Sky Radio'


Question:
What is the charge amount of the most expensive charge type?
Additional table information: table: dog_kennels

Answer: SELECT MAX(charge_amount) FROM Charges


Question:
Return the number of flights arriving in Aberdeen.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = 'Aberdeen'


Question:
How many dogs have an age below the average?
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM Dogs WHERE age < (SELECT AVG(age) FROM Dogs)


Question:
How many states are there?
Additional table information: table: voter_1

Answer: SELECT COUNT(*) FROM area_code_state


Question:
What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?
Additional table information: table: car_1

Answer: SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING COUNT(*) > 3 UNION SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'


Question:
How many cars have a larger accelerate than the car with the largest horsepower?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > (SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1)


Question:
Give the name of the nation that uses the greatest amount of languages.
Additional table information: table: world_1

Answer: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1


Question:
How much does the car accelerate that makes amc hornet sportabout (sw)?
Additional table information: table: car_1

Answer: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'


Question:
How many different departments offer degrees?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs


Question:
What are the name and results of the battles when the bulgarian commander is not 'Boril'
Additional table information: table: battle_death

Answer: SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril'


Question:
How many continents are there?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CONTINENTS


Question:
What are the names of airports in Aberdeen?
Additional table information: table: flight_2

Answer: SELECT AirportName FROM AIRPORTS WHERE City = 'Aberdeen'


Question:
Give the ids of documents that have between one and two paragraphs.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) BETWEEN 1 AND 2


Question:
What is the number of cars with a horsepower greater than 150?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE horsepower > 150


Question:
When did the episode 'A Love of a Lifetime' air?
Additional table information: table: tvshow

Answer: SELECT Air_Date FROM TV_series WHERE Episode = 'A Love of a Lifetime'


Question:
How many distinct nationalities are there?
Additional table information: table: poker_player

Answer: SELECT COUNT(DISTINCT Nationality) FROM people


Question:
What are the countries that are not playing cartoons written by Todd Casey?
Additional table information: table: tvshow

Answer: 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'


Question:
Find the name of the employee who got the highest one time bonus.
Additional table information: table: employee_hire_evaluation

Answer: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1


Question:
Count the number of paragraphs in the document named 'Summer Show'.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'


Question:
Show all template type codes that are not used by any document.
Additional table information: table: cre_Doc_Template_Mgt

Answer: 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


Question:
Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
Additional table information: table: world_1

Answer: SELECT COUNT(T2.Language), T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2


Question:
How many high schoolers are there in grade 9 or 10?
Additional table information: table: network_1

Answer: SELECT COUNT(*) FROM Highschooler WHERE grade = 9 OR grade = 10


Question:
What is the date and id of the transcript with at least 2 courses listed?
Additional table information: table: student_transcripts_tracking

Answer: 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


Question:
List the names of poker players ordered by the final tables made in ascending order.
Additional table information: table: poker_player

Answer: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made NULLS FIRST