Question:
What is the total number of people living in the nations that do not use 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 flight numbers of Airline 'United Airlines'?
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:
Which airlines 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:
List the language used least number of TV Channel. List language and number of TV Channel.
Additional table information: table: tvshow

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


Question:
How many professionals have performed any treatment to dogs?
Additional table information: table: dog_kennels

Answer: SELECT COUNT(DISTINCT professional_id) FROM Treatments


Question:
What is the series name of the TV Channel that shows the cartoon 'The Rise of the Blue Beetle'?
Additional table information: table: tvshow

Answer: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = 'The Rise of the Blue Beetle!'


Question:
find the id, name and age for visitors who visited some museums more than once.
Additional table information: table: museum_visit

Answer: SELECT t1.id, t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING COUNT(*) > 1


Question:
What is the number of distinct continents where Chinese is spoken?
Additional table information: table: world_1

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


Question:
What is the TV Channel that shows the cartoon 'The Rise of the Blue Beetle!'? List the TV Channel's series name.
Additional table information: table: tvshow

Answer: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = 'The Rise of the Blue Beetle!'


Question:
Show the document id with 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:
Which professionals have done at least two treatments? List the professional's id, role, and first name.
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:
For each citizenship, how many singers are from that country?
Additional table information: table: singer

Answer: SELECT Citizenship, COUNT(*) FROM singer GROUP BY Citizenship


Question:
Compute the average age of all the dogs.
Additional table information: table: dog_kennels

Answer: SELECT AVG(age) FROM Dogs


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

Answer: SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
In which years cars were produced weighing no less than 3000 and no more than 4000 ?
Additional table information: table: car_1

Answer: SELECT DISTINCT year FROM cars_data WHERE weight BETWEEN 3000 AND 4000


Question:
List all the student details in reversed lexicographical order.
Additional table information: table: student_transcripts_tracking

Answer: SELECT other_student_details FROM Students ORDER BY other_student_details DESC


Question:
List pairs of the owner's first name and the dogs's name.
Additional table information: table: dog_kennels

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


Question:
What is the earliest date of a transcript release, and what details can you tell me?
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 first name of every student who has a dog but does not have a cat?
Additional table information: table: pets_1

Answer: SELECT T1.fname, T1.age 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' AND NOT T1.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:
What are the codes of template types that are not used for 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:
What is the total number of singers?
Additional table information: table: concert_singer

Answer: SELECT COUNT(*) FROM singer


Question:
How many museums were opened after 2013 or before 2008?
Additional table information: table: museum_visit

Answer: SELECT COUNT(*) FROM museum WHERE open_year > 2013 OR open_year < 2008


Question:
What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?
Additional table information: table: world_1

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


Question:
How many United Airlines flights go to City 'Aberdeen'?
Additional table information: table: flight_2

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


Question:
What are flight numbers of flights departing from Airport 'APG'?
Additional table information: table: flight_2

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


Question:
Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.
Additional table information: table: dog_kennels

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


Question:
What is the number of cartoones written by Joseph Kuhr?
Additional table information: table: tvshow

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


Question:
What is the number of car models created by the car maker American Motor Company?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'


Question:
What are the names of singers ordered by ascending net worth?
Additional table information: table: singer

Answer: SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC NULLS FIRST


Question:
What is the episode for the TV series named '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 ids of templates with template type 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:
How many owners temporarily do not have any dogs?
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM Owners WHERE NOT owner_id IN (SELECT owner_id FROM Dogs)


Question:
Show names of people whose nationality is not 'Russia'.
Additional table information: table: poker_player

Answer: SELECT Name FROM people WHERE Nationality <> 'Russia'


Question:
How many matches were played in each year?
Additional table information: table: wta_1

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


Question:
What are the number of votes from state 'NY' or 'CA'?
Additional table information: table: voter_1

Answer: SELECT COUNT(*) FROM votes WHERE state = 'NY' OR state = 'CA'


Question:
Find the semester when both Master students and Bachelor students got enrolled in.
Additional table information: table: student_transcripts_tracking

Answer: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'


Question:
Give me the description of the treatment type whose total cost is the lowest.
Additional table information: table: dog_kennels

Answer: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) ASC NULLS FIRST LIMIT 1


Question:
How many likes does Kyle have?
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:
What is the name and capacity for the stadium with highest average attendance?
Additional table information: table: concert_singer

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


Question:
How many singers are from each country?
Additional table information: table: concert_singer

Answer: SELECT country, COUNT(*) FROM singer GROUP BY country


Question:
Return the names of friends of the high school student Kyle.
Additional table information: table: network_1

Answer: SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = 'Kyle'


Question:
For each shop, return the number of employees working there and the name of the shop.
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:
List the names of conductors in ascending order of age.
Additional table information: table: orchestra

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


Question:
Which city and country is the Alton airport at?
Additional table information: table: flight_2

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


Question:
Which continent speaks the most languages?
Additional table information: table: world_1

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


Question:
What is the language spoken by the largest percentage of people in each country?
Additional table information: table: world_1

Answer: SELECT LANGUAGE, CountryCode, MAX(Percentage) FROM countrylanguage GROUP BY CountryCode


Question:
What are the names of conductors as well as the corresonding orchestras that 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:
Which distinct car models are the produced after 1980?
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 WHERE T3.year > 1980


Question:
How many countries speak both 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:
Count the number of distinct store locations.
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(DISTINCT LOCATION) FROM shop


Question:
What is Weekly Rank of TV series with Episode 'A Love of a Lifetime'?
Additional table information: table: tvshow

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


Question:
Count the number of countries in Asia.
Additional table information: table: world_1

Answer: SELECT COUNT(*) FROM country WHERE continent = 'Asia'


Question:
Show the date of the transcript which shows the least number of results, also list the id.
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 is the TV Channel of TV series with Episode 'A Love of a Lifetime'? List the TV Channel's series name.
Additional table information: table: tvshow

Answer: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = 'A Love of a Lifetime'


Question:
What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?
Additional table information: table: orchestra

Answer: SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003


Question:
List the names of employees and sort in ascending order of age.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name FROM employee ORDER BY age NULLS FIRST


Question:
What are the names of conductors who have conducted at more than one orchestra?
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:
What are the codes of the countries that do not speak English and whose government forms are not Republic?
Additional table information: table: world_1

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


Question:
What is the grade of each high schooler?
Additional table information: table: network_1

Answer: SELECT grade FROM Highschooler


Question:
What are the names of people who do not play poker?
Additional table information: table: poker_player

Answer: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player)


Question:
What is the department description for the one whose name has the word computer?
Additional table information: table: student_transcripts_tracking

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


Question:
Show names of teachers and the number of courses 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:
Return the nationalities for which there are two or more people.
Additional table information: table: poker_player

Answer: SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2


Question:
What is the most common nationality of people?
Additional table information: table: poker_player

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


Question:
What model has the most different versions?
Additional table information: table: car_1

Answer: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1


Question:
List all song names by singers above the average age.
Additional table information: table: concert_singer

Answer: SELECT song_name FROM singer WHERE age > (SELECT AVG(age) FROM singer)


Question:
Find the number of cities in each district whose population is greater than the average population of cities?
Additional table information: table: world_1

Answer: SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District


Question:
What is the age and hometown of every teacher?
Additional table information: table: course_teach

Answer: SELECT Age, Hometown FROM teacher


Question:
List the name of the conductor with the most years of work.
Additional table information: table: orchestra

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


Question:
What are the arriving date and the departing date of the dogs who have gone through 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:
What are the names of the teachers who are aged either 32 or 33?
Additional table information: table: course_teach

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


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

Answer: SELECT stuid FROM student EXCEPT 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:
What is the first, middle, and last name of the earliest school graduate?
Additional table information: table: student_transcripts_tracking

Answer: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC NULLS FIRST LIMIT 1


Question:
What are the names of the singers whose birth years are either 1948 or 1949?
Additional table information: table: singer

Answer: SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949


Question:
What are the codes of countries with more than 50 players?
Additional table information: table: wta_1

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


Question:
How many singers are there?
Additional table information: table: singer

Answer: SELECT COUNT(*) FROM singer


Question:
What are the total number of positions on the Toronto team in 2006-07?
Additional table information: table: "canadian_football"."players"
columns: player, player_number, nationality, Position, years_in_toronto, school_club_team

Answer: SELECT COUNT Position FROM "canadian_football"."players" WHERE years_in_toronto = '2006-07'


Question:
How much does the most recent treatment cost?
Additional table information: table: dog_kennels

Answer: SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1


Question:
What is the content of TV Channel with serial name 'Sky Radio'?
Additional table information: table: tvshow

Answer: SELECT Content FROM TV_Channel WHERE series_name = 'Sky Radio'


Question:
Show all distinct template type codes for all templates.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT DISTINCT template_type_code FROM Templates


Question:
What are the arriving date and the departing date of all the dogs?
Additional table information: table: dog_kennels

Answer: SELECT date_arrived, date_departed FROM Dogs


Question:
How many concerts occurred in 2014 or 2015?
Additional table information: table: concert_singer

Answer: SELECT COUNT(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015


Question:
What is the model for the car with a weight smaller than the average?
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.Weight < (SELECT AVG(Weight) FROM CARS_DATA)


Question:
For students who have pets , how many pets does each student have ? list their ids instead of names .
Additional table information: table: pets_1

Answer: SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid


Question:
What is the number of cars with a greater accelerate than the one with the most 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:
For a volvo model, how many cylinders does the version with 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:
Find the number of orchestras whose record format is 'CD' or 'DVD'.
Additional table information: table: orchestra

Answer: SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = 'CD' OR Major_Record_Format = 'DVD'


Question:
What are the different first names and ages of the students who do have pets?
Additional table information: table: pets_1

Answer: SELECT DISTINCT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid


Question:
Return the id and name of the document with the most paragraphs.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
Additional table information: table: wta_1

Answer: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1


Question:
Show the name of the conductor that has conducted the most number of 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 ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are airlines that have flights arriving at 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.DestAirport = 'AHD'


Question:
Which airlines have departures from CVO but not from APG 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 = 'CVO' EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'APG'


Question:
How many courses in total are listed?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(*) FROM Courses


Question:
Return the name, location and district of all shops in descending order of number of products.
Additional table information: table: employee_hire_evaluation

Answer: SELECT name, LOCATION, district FROM shop ORDER BY number_products DESC


Question:
Show the name and the release year of the song by the youngest singer.
Additional table information: table: concert_singer

Answer: SELECT song_name, song_release_year FROM singer ORDER BY age NULLS FIRST LIMIT 1


Question:
How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
Additional table information: table: flight_2

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


Question:
Return the number of flights departing from 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:
How many cars have more than 4 cylinders?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 4


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

Answer: SELECT COUNT(*) FROM Paragraphs


Question:
What are the emails of the professionals living in either 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:
List the vote ids, phone numbers and states of all votes.
Additional table information: table: voter_1

Answer: SELECT vote_id, phone_number, state FROM votes


Question:
What are the ids and names of the battles that led to more than 10 people killed in total.
Additional table information: table: battle_death

Answer: SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10


Question:
Show the date and id of the transcript with at least 2 course 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 HAVING COUNT(*) >= 2


Question:
What is the language that is used by the largest number of Asian nations?
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.Continent = 'Asia' GROUP BY T2.Language ORDER BY COUNT(*) DESC LIMIT 1


Question:
Give the country codes for countries in which people speak langauges that are not English.
Additional table information: table: world_1

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


Question:
Show the names of students who have a grade higher than 5 and have at least 2 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 high schoolers.
Additional table information: table: network_1

Answer: SELECT COUNT(*) FROM Highschooler


Question:
What is the ship id and name that caused most total injuries?
Additional table information: table: battle_death

Answer: SELECT T2.id, T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
Additional table information: table: tvshow

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 is the full name of each car maker, along with its id and how many models it produces?
Additional table information: table: car_1

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


Question:
How many poker players are there?
Additional table information: table: poker_player

Answer: SELECT COUNT(*) FROM poker_player


Question:
Find the average rank of winners in all matches.
Additional table information: table: wta_1

Answer: SELECT AVG(winner_rank) FROM matches


Question:
What is the name of the course with the most students enrolled?
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1


Question:
What the smallest version number and its template type code?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT MIN(Version_Number), template_type_code FROM Templates


Question:
What is the largest amount of horsepower for the models with 3 cylinders and what make is it?
Additional table information: table: car_1

Answer: SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1


Question:
What is the country with the most number of TV Channels and how many does it have?
Additional table information: table: tvshow

Answer: SELECT Country, COUNT(*) FROM TV_Channel GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the name of each teacher and what course they teach?
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


Question:
For each language, list the number of TV Channels that use it.
Additional table information: table: tvshow

Answer: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE


Question:
Show the names of singers that have more than one song.
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:
How many dogs went through any treatments?
Additional table information: table: dog_kennels

Answer: SELECT COUNT(DISTINCT dog_id) FROM Treatments


Question:
List names of conductors in descending order of years of work.
Additional table information: table: orchestra

Answer: SELECT Name FROM conductor ORDER BY Year_of_Work DESC


Question:
What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT T1.paragraph_id, T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'


Question:
List the airport code and name in the city of Anthony.
Additional table information: table: flight_2

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


Question:
Who is the first student to register? List the first name, middle name and last name.
Additional table information: table: student_transcripts_tracking

Answer: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered ASC NULLS FIRST LIMIT 1


Question:
How many airlines are from USA?
Additional table information: table: flight_2

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


Question:
Show the names of all high schoolers in grade 10.
Additional table information: table: network_1

Answer: SELECT name FROM Highschooler WHERE grade = 10


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

Answer: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs


Question:
Return the grade for the high schooler named Kyle.
Additional table information: table: network_1

Answer: SELECT grade FROM Highschooler WHERE name = 'Kyle'


Question:
What is the official language spoken in the country whose head of state is Beatrix?
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.HeadOfState = 'Beatrix' AND T2.IsOfficial = 'T'


Question:
List the names of people that are not poker players.
Additional table information: table: poker_player

Answer: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player)


Question:
What is the average transcript date?
Additional table information: table: student_transcripts_tracking

Answer: SELECT AVG(transcript_date) FROM Transcripts


Question:
Which city is the most frequent source airport?
Additional table information: table: flight_2

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


Question:
Count the number of flights into ATO.
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = 'ATO'


Question:
Show the stadium names without any concert.
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 different models created by either the car maker General Motors or weighed 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:
What are the package options and the name of the series for the TV Channel that supports high definition TV?
Additional table information: table: tvshow

Answer: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = 'yes'


Question:
What is the average earnings of poker players with height higher 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:
What is the total population and maximum GNP in Asia?
Additional table information: table: world_1

Answer: SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = 'Asia'


Question:
What are flight numbers of flights arriving at Airport 'APG'?
Additional table information: table: flight_2

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


Question:
How many visitors below age 30 are there?
Additional table information: table: museum_visit

Answer: SELECT COUNT(*) FROM visitor WHERE age < 30


Question:
What are the names of all cartoons directed by Ben Jones?
Additional table information: table: tvshow

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


Question:
What are each owner's first name and their dogs's name?
Additional table information: table: dog_kennels

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


Question:
Give the flight numbers of flights landing at APG.
Additional table information: table: flight_2

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


Question:
What are the names of high schoolers who have 3 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 GROUP BY T1.student_id HAVING COUNT(*) >= 3


Question:
What is the name of the breed with the most dogs?
Additional table information: table: dog_kennels

Answer: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY COUNT(*) DESC LIMIT 1


Question:
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
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 first names and country codes for players who won both the WTA Championships and the 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 names of cities that have a population between 160000 and 900000 .
Additional table information: table: world_1

Answer: SELECT name FROM city WHERE population BETWEEN 160000 AND 900000


Question:
Give the names of poker players who have earnings above 300000.
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 WHERE T2.Earnings > 300000


Question:
What is the number of carsw ith over 6 cylinders?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6


Question:
What is all the information about hiring?
Additional table information: table: employee_hire_evaluation

Answer: SELECT * FROM hiring


Question:
What are the names of students who have 2 or more 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 HAVING COUNT(*) >= 2


Question:
How many teachers are there?
Additional table information: table: course_teach

Answer: SELECT COUNT(*) FROM teacher


Question:
How many battles did not lose any ship with tonnage '225'?
Additional table information: table: battle_death

Answer: SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225')


Question:
How many employees are there?
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(*) FROM employee


Question:
List the name, date and result of each battle.
Additional table information: table: battle_death

Answer: SELECT name, date FROM battle


Question:
Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.
Additional table information: table: dog_kennels

Answer: SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1, Treatments AS T2 WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments)


Question:
Give the names of the nations that were founded after 1950.
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE IndepYear > 1950


Question:
How many cartoons did each director create?
Additional table information: table: tvshow

Answer: SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by


Question:
Find the program which most number of students are enrolled in. List both the id and the summary.
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Who is the earliest graduate of the school? List the first name, middle name and last name.
Additional table information: table: student_transcripts_tracking

Answer: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC NULLS FIRST LIMIT 1


Question:
What are the birth year and citizenship of singers?
Additional table information: table: singer

Answer: SELECT Birth_Year, Citizenship FROM singer


Question:
Show names of teachers and the courses they are arranged to teach.
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


Question:
What major is every student who does not own a cat as a pet, and also how old are they?
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:
List top 3 highest Rating  TV series. List the TV series's Episode and Rating.
Additional table information: table: tvshow

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


Question:
How many different forms of governments are there in Africa?
Additional table information: table: world_1

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


Question:
How many car makers are there in each continents? List the continent name and the count.
Additional table information: table: car_1

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


Question:
Please show the name of the conductor that has conducted orchestras founded after 2008.
Additional table information: table: orchestra

Answer: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008


Question:
What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?
Additional table information: table: car_1

Answer: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980


Question:
What is the number of distinct languages used around the world?
Additional table information: table: world_1

Answer: SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage


Question:
What language is predominantly spoken in Aruba?
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.Name = 'Aruba' ORDER BY Percentage DESC LIMIT 1


Question:
Show all template type codes and descriptions.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code, template_type_description FROM Ref_template_types


Question:
What are all the song names by singers who are older than average?
Additional table information: table: concert_singer

Answer: SELECT song_name FROM singer WHERE age > (SELECT AVG(age) FROM singer)


Question:
What is the name of the series that has the episode 'A Love of a Lifetime'?
Additional table information: table: tvshow

Answer: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = 'A Love of a Lifetime'


Question:
How many distinct countries do players come from?
Additional table information: table: wta_1

Answer: SELECT COUNT(DISTINCT country_code) FROM players


Question:
Find the average number of staff working for the museums that were open before 2009.
Additional table information: table: museum_visit

Answer: SELECT AVG(num_of_staff) FROM museum WHERE open_year < 2009


Question:
Which city has the most frequent destination airport?
Additional table information: table: flight_2

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


Question:
Find the number of flights landing in the city of 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:
What is the semester which most student registered in? Show both the name and the id.
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.semester_name, T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the first name, country code, and birth date of the player with the most winner rank points across all matches?
Additional table information: table: wta_1

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:
Tell me the age of the oldest dog.
Additional table information: table: dog_kennels

Answer: SELECT MAX(age) FROM Dogs


Question:
What are the names of all European countries with at least 3 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:
Count the number of poker players.
Additional table information: table: poker_player

Answer: SELECT COUNT(*) FROM poker_player


Question:
List the title of all cartoon 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:
What are the names of the countries that are in the continent of Europe and have a population of 80000?
Additional table information: table: world_1

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


Question:
What is the average number of injuries caused each time?
Additional table information: table: battle_death

Answer: SELECT AVG(injured) FROM death


Question:
How many continents speak Chinese?
Additional table information: table: world_1

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


Question:
Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
Additional table information: table: museum_visit

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


Question:
Find the average age of the dogs who went through 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 names and ids of every course with less than 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:
How many different templates do all document use?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(DISTINCT template_id) FROM Documents


Question:
What are the names of the singers who performed in a concert in 2014?
Additional table information: table: concert_singer

Answer: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014


Question:
What are all of the episodes ordered by ratings?
Additional table information: table: tvshow

Answer: SELECT Episode FROM TV_series ORDER BY rating NULLS FIRST


Question:
What are the first name and last name of the professionals who have done treatment with cost below average?
Additional table information: table: dog_kennels

Answer: SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1, Treatments AS T2 WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments)


Question:
Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .
Additional table information: table: world_1

Answer: SELECT SUM(population), AVG(surfacearea) FROM country WHERE continent = 'north america' AND surfacearea > 3000


Question:
What are the names of the teachers ordered by ascending age?
Additional table information: table: course_teach

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


Question:
Show the names of high schoolers who have likes, and numbers of likes for each.
Additional table information: table: network_1

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


Question:
Find the minimum grade of students who have no friends.
Additional table information: table: network_1

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


Question:
Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.
Additional table information: table: dog_kennels

Answer: SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'


Question:
How many countries have a republic as their form of government?
Additional table information: table: world_1

Answer: SELECT COUNT(*) FROM country WHERE GovernmentForm = 'Republic'


Question:
Give the mean life expectancy of countries in which English is not the official language.
Additional table information: table: world_1

Answer: SELECT AVG(LifeExpectancy) 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' AND T2.IsOfficial = 'T')


Question:
Show all document ids, names and the number of paragraphs in each document.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT T1.document_id, T2.document_name, COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id


Question:
What are the nationalities that are shared by at least two people?
Additional table information: table: poker_player

Answer: SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2


Question:
What is the name of country that has the shortest life expectancy in Asia?
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE Continent = 'Asia' ORDER BY LifeExpectancy NULLS FIRST LIMIT 1


Question:
Show the record companies shared by orchestras founded before 2003 and after 2003.
Additional table information: table: orchestra

Answer: SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003


Question:
Return the ids corresponding to templates with the 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 number of concerts that occurred in the stadium with the largest capacity ?
Additional table information: table: concert_singer

Answer: SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1)


Question:
List each owner's first name, last name, and the size of his for her 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:
What is the official language used in the country the name of whose head of state is Beatrix.
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.HeadOfState = 'Beatrix' AND T2.IsOfficial = 'T'


Question:
Return the name of the airport with code 'AKO'.
Additional table information: table: flight_2

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


Question:
What are the template ids of any templates used in more than a single document?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id FROM Documents GROUP BY template_id HAVING COUNT(*) > 1


Question:
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
Additional table information: table: battle_death

Answer: SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'


Question:
What is the total surface area of the countries in the Caribbean region?
Additional table information: table: world_1

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


Question:
Find the number of pets for each student who has any pet and student id.
Additional table information: table: pets_1

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


Question:
What is the id, line 1, and line 2 of the address with the most students?
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show the hometowns shared by at least two teachers.
Additional table information: table: course_teach

Answer: SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2


Question:
What are the names of all high schoolers in grade 10?
Additional table information: table: network_1

Answer: SELECT name FROM Highschooler WHERE grade = 10


Question:
Whose permanent address is different from his or her current address? List his or her first name.
Additional table information: table: student_transcripts_tracking

Answer: SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id


Question:
Find the first names that 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:
List the first and last name of all players who are left / L hand in the order of birth date.
Additional table information: table: wta_1

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


Question:
What is the total number of unique official languages spoken in the countries that are founded before 1930?
Additional table information: table: world_1

Answer: SELECT COUNT(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = 'T'


Question:
Find the number of players for each hand type.
Additional table information: table: wta_1

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


Question:
Which professionals have done at least two types of treatments? List the professional id and cell phone.
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:
List the final tables made and the best finishes of poker players.
Additional table information: table: poker_player

Answer: SELECT Final_Table_Made, Best_Finish FROM poker_player


Question:
Return the maximum and minimum shares for performances that do not have the type 'Live final'.
Additional table information: table: orchestra

Answer: SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> 'Live final'


Question:
What is the average miles per gallon(mpg) of the cars with 4 cylinders?
Additional table information: table: car_1

Answer: SELECT AVG(mpg) FROM CARS_DATA WHERE Cylinders = 4


Question:
Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.
Additional table information: table: dog_kennels

Answer: SELECT professional_id, last_name, cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id, T1.last_name, 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 ships ended up being 'Captured'?
Additional table information: table: battle_death

Answer: SELECT COUNT(*) FROM ship WHERE disposition_of_ship = 'Captured'


Question:
find the names of loser and winner who played in the match with greatest number of minutes.
Additional table information: table: wta_1

Answer: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1


Question:
What are the names of the countries with no car makers?
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:
Find the government form name and total population for each government form whose average life expectancy is longer than 72.
Additional table information: table: world_1

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


Question:
What are the earnings of poker players, ordered descending by value?
Additional table information: table: poker_player

Answer: SELECT Earnings FROM poker_player ORDER BY Earnings DESC


Question:
Find the cities that have more than one employee under age 30.
Additional table information: table: employee_hire_evaluation

Answer: SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING COUNT(*) > 1


Question:
What is the average horsepower for all cars produced before 1980 ?
Additional table information: table: car_1

Answer: SELECT AVG(horsepower) FROM cars_data WHERE year < 1980


Question:
Count the number of dogs that went through a treatment.
Additional table information: table: dog_kennels

Answer: SELECT COUNT(DISTINCT dog_id) FROM Treatments


Question:
How many flights do we have?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS


Question:
which countries' tv channels are not playing any cartoon 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:
What are the package options of all tv channels that are not playing any cartoons 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 many flights arriving in Aberdeen city?
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:
List the number of all matches who played in years of 2013 or 2016.
Additional table information: table: wta_1

Answer: SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016


Question:
Count the number of documents that use the PPT template type.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'


Question:
Find the model of the car whose weight is below the average weight.
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.Weight < (SELECT AVG(Weight) FROM CARS_DATA)


Question:
Show all template type codes and number of templates for each.
Additional table information: table: cre_Doc_Template_Mgt

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


Question:
Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2


Question:
How many official languages does Afghanistan have?
Additional table information: table: world_1

Answer: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Afghanistan' AND IsOfficial = 'T'


Question:
What is the average weight for each type of pet?
Additional table information: table: pets_1

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


Question:
How many transcripts are released?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(*) FROM Transcripts


Question:
Return the lowest version number, along with its corresponding template type code.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT MIN(Version_Number), template_type_code FROM Templates


Question:
What is the Package Option of TV Channel with serial name 'Sky Radio'?
Additional table information: table: tvshow

Answer: SELECT Package_Option FROM TV_Channel WHERE series_name = 'Sky Radio'


Question:
What are the names of people who are not from Russia?
Additional table information: table: poker_player

Answer: SELECT Name FROM people WHERE Nationality <> 'Russia'


Question:
What is the hometown of the youngest teacher?
Additional table information: table: course_teach

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


Question:
What are all distinct countries where singers above age 20 are from?
Additional table information: table: concert_singer

Answer: SELECT DISTINCT country FROM singer WHERE age > 20


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

Answer: SELECT COUNT(DISTINCT Nationality) FROM conductor


Question:
How many car models were produced by the maker with full name American Motor Company?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'


Question:
Find the first name and age of students who have a dog but do not have a cat as a pet.
Additional table information: table: pets_1

Answer: SELECT T1.fname, T1.age 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' AND NOT T1.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:
What are the names of countries that speak more than 2 languages, as well as how many languages they speak?
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:
Count the number of orchestras that have CD or DVD as their record format.
Additional table information: table: orchestra

Answer: SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = 'CD' OR Major_Record_Format = 'DVD'


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

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


Question:
List the email, cell phone and home phone of all the professionals.
Additional table information: table: dog_kennels

Answer: SELECT email_address, cell_number, home_phone FROM professionals


Question:
Which language is the most popular on the Asian continent?
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.Continent = 'Asia' GROUP BY T2.Language ORDER BY COUNT(*) DESC LIMIT 1


Question:
What's the name of the course with most number of enrollments?
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1


Question:
How many people live in Asia, and what is the largest GNP among them?
Additional table information: table: world_1

Answer: SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = 'Asia'


Question:
Give the name, year of independence, and surface area of the country that has the lowest population.
Additional table information: table: world_1

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


Question:
What are the names of poker players whose earnings is higher than 300000?
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 WHERE T2.Earnings > 300000


Question:
Return the type code of the template type that the most templates belong to.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1


Question:
Show the citizenship shared by singers with 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 conductors who have conducted orchestras founded after the year 2008?
Additional table information: table: orchestra

Answer: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008


Question:
What is the name of the winner with the most rank points who participated in the Australian Open tournament?
Additional table information: table: wta_1

Answer: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1


Question:
Find the districts in which there are both shops selling less than 3000 products and shops selling 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 is the average life expectancy in African countries that are republics?
Additional table information: table: world_1

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


Question:
What is the airport code of the airport with the most 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 all airlines that have fewer than 200 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(*) < 200


Question:
Which professional did not operate any treatment on dogs? List the professional's id, role and email.
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:
Find the number of cartoons directed by each of the listed directors.
Additional table information: table: tvshow

Answer: SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by


Question:
What are the names, countries, and ages for every singer in descending order of age?
Additional table information: table: concert_singer

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


Question:
How many flights does airline 'JetBlue Airways' have?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = 'JetBlue Airways'


Question:
How many friends does the high school student Kyle have?
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:
Show different citizenship of singers and the number of singers of each citizenship.
Additional table information: table: singer

Answer: SELECT Citizenship, COUNT(*) FROM singer GROUP BY Citizenship


Question:
Show ids of all students who do not have any friends.
Additional table information: table: network_1

Answer: SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend


Question:
Return the codes of countries for which Spanish is the predominantly spoken language.
Additional table information: table: world_1

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


Question:
What is the zip code for Port Chelsea?
Additional table information: table: student_transcripts_tracking

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


Question:
How many different series and contents are listed in the TV Channel table?
Additional table information: table: tvshow

Answer: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel


Question:
What is the average, minimum, and maximum age of all singers from France?
Additional table information: table: concert_singer

Answer: SELECT AVG(age), MIN(age), MAX(age) FROM singer WHERE country = 'France'


Question:
find the pixel aspect ratio and nation of the tv channels that do not use English.
Additional table information: table: tvshow

Answer: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English'


Question:
How many people are there of each nationality?
Additional table information: table: poker_player

Answer: SELECT Nationality, COUNT(*) FROM people GROUP BY Nationality


Question:
What are the names of tournaments that have more than 10 matches?
Additional table information: table: wta_1

Answer: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10


Question:
What is the program id and the summary of the degree that has the most students enrolled?
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
Which breed do the most dogs have? Give me the breed name.
Additional table information: table: dog_kennels

Answer: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY COUNT(*) DESC LIMIT 1


Question:
Which city has most number of departing flights?
Additional table information: table: flight_2

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


Question:
Which template type code has most number of templates?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1


Question:
Find the names of stores whose number products is more than the average number of products.
Additional table information: table: employee_hire_evaluation

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


Question:
What are the names of the people who teach math courses?
Additional table information: table: course_teach

Answer: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = 'Math'


Question:
What are the ids for templates that are not used in any documents?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents


Question:
Find the manager name and district of the shop whose number of products is the largest.
Additional table information: table: employee_hire_evaluation

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


Question:
Give me Brazil’s population and life expectancies.
Additional table information: table: world_1

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


Question:
Which owner owns the most dogs? List the owner id, first name and last name.
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:
List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.
Additional table information: table: dog_kennels

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


Question:
What are the final tables made and best finishes for all poker players?
Additional table information: table: poker_player

Answer: SELECT Final_Table_Made, Best_Finish FROM poker_player


Question:
What are the countries that have greater surface area than any country in Europe?
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = 'Europe')


Question:
Count the number of dogs of an age below the average.
Additional table information: table: dog_kennels

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


Question:
What is the feature type name of feature AirCon?
Additional table information: table: real_estate_properties

Answer: SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = 'AirCon'


Question:
Which language is the most popular in Aruba?
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.Name = 'Aruba' ORDER BY Percentage DESC LIMIT 1


Question:
Return the names of all the 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:
Which airline has most number of 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:
What is the document id, template id and description for document named 'Robbin CV'?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id, template_id, Document_Description FROM Documents WHERE document_name = 'Robbin CV'


Question:
What is the number of employees from each city?
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(*), city FROM employee GROUP BY city


Question:
Find the average age of students who do not have any pet .
Additional table information: table: pets_1

Answer: SELECT AVG(age) FROM student WHERE NOT stuid IN (SELECT stuid FROM has_pet)


Question:
What are the age and hometown of teachers?
Additional table information: table: course_teach

Answer: SELECT Age, Hometown FROM teacher


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

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


Question:
How many unique languages are spoken in the world?
Additional table information: table: world_1

Answer: SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage


Question:
Which employee received the biggest bonus? 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 ORDER BY t2.bonus DESC LIMIT 1


Question:
What are the names of the 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:
What are the names of all the countries that became independent after 1950?
Additional table information: table: world_1

Answer: SELECT Name FROM country WHERE IndepYear > 1950


Question:
What are the maximum and minimum values of area codes?
Additional table information: table: voter_1

Answer: SELECT MAX(area_code), MIN(area_code) FROM area_code_state


Question:
What is the content of the series Sky Radio?
Additional table information: table: tvshow

Answer: SELECT Content FROM TV_Channel WHERE series_name = 'Sky Radio'


Question:
Show the name of the teacher for the math course.
Additional table information: table: course_teach

Answer: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = 'Math'


Question:
What is the abbreviation of Airline 'JetBlue Airways'?
Additional table information: table: flight_2

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


Question:
What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?
Additional table information: table: car_1

Answer: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980


Question:
What are the different ids and names of the battles that lost any 'Brig' type shipes?
Additional table information: table: battle_death

Answer: SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'


Question:
How many degrees does the engineering department offer?
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:
How many countries are listed?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM COUNTRIES


Question:
What is the count of the car models produced in the United States?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'


Question:
Find the total number of matches.
Additional table information: table: wta_1

Answer: SELECT COUNT(*) FROM matches


Question:
Count the number of countries for which Spanish is the predominantly spoken language.
Additional table information: table: world_1

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


Question:
What are the ids of high school students who do not have friends?
Additional table information: table: network_1

Answer: SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend


Question:
Count the number of employees
Additional table information: table: employee_hire_evaluation

Answer: SELECT COUNT(*) FROM employee


Question:
Return the birth date of the poker player with the lowest earnings.
Additional table information: table: poker_player

Answer: SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC NULLS FIRST LIMIT 1


Question:
How many departments offer any degree?
Additional table information: table: student_transcripts_tracking

Answer: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs


Question:
How many cars has over 6 cylinders?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6


Question:
List the last name of the owner owning the youngest dog.
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 names of all stadiums that did not have a concert in 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 is the name of each continent and how many car makers are there in each one?
Additional table information: table: car_1

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


Question:
What is the degree summary name that has the most number of students enrolled?
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:
How many different results are there for the battles?
Additional table information: table: battle_death

Answer: SELECT COUNT(DISTINCT RESULT) FROM battle


Question:
Which Asian countries have a population that is larger than any country in Africa?
Additional table information: table: world_1

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


Question:
What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?
Additional table information: table: student_transcripts_tracking

Answer: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2


Question:
What are all the course names of the courses which ever have students enrolled in?
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 ids of the TV channels that do not have any cartoons 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:
How many models does each car maker produce? List maker full name, id and the number.
Additional table information: table: car_1

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


Question:
What is the code of airport that has fewest 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(*) NULLS FIRST LIMIT 1


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

Answer: SELECT COUNT(*) FROM Documents


Question:
Find the number of pets whose weight is heavier than 10.
Additional table information: table: pets_1

Answer: SELECT COUNT(*) FROM pets WHERE weight > 10


Question:
List the names and birth dates of people in ascending alphabetical order of name.
Additional table information: table: poker_player

Answer: SELECT Name, Birth_Date FROM people ORDER BY Name ASC NULLS FIRST


Question:
Find the number of owners who do not own any dogs at this moment.
Additional table information: table: dog_kennels

Answer: SELECT COUNT(*) FROM Owners WHERE NOT owner_id IN (SELECT owner_id FROM Dogs)


Question:
For the countries founded before 1930, what is the total number of distinct official languages?
Additional table information: table: world_1

Answer: SELECT COUNT(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = 'T'


Question:
What are the ids, names, and descriptions for all documents?
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id, document_name, document_description FROM Documents


Question:
What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?
Additional table information: table: world_1

Answer: SELECT SUM(population), AVG(surfacearea) FROM country WHERE continent = 'north america' AND surfacearea > 3000


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

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


Question:
For the cars with 4 cylinders, which model has the largest 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:
Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?
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 < 4


Question:
Find 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:
List the first name of all the professionals along with the description of the treatment they have done.
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:
Which model has the most version(make) of cars?
Additional table information: table: car_1

Answer: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1


Question:
List the contestant numbers and names, ordered by contestant name descending.
Additional table information: table: voter_1

Answer: SELECT contestant_number, contestant_name FROM contestants ORDER BY contestant_name DESC


Question:
How many flights have destination ATO?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = 'ATO'


Question:
What is the lowest grade of students who do not have any friends?
Additional table information: table: network_1

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


Question:
Find all airlines that have flights from airport 'CVO' but not from 'APG'.
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 = 'CVO' EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = 'APG'


Question:
What is the maximum number of final tables made among poker players with earnings less than 200000?
Additional table information: table: poker_player

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


Question:
Count the number of high schoolers in grades 9 or 10.
Additional table information: table: network_1

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


Question:
List the earnings of poker players in descending order.
Additional table information: table: poker_player

Answer: SELECT Earnings FROM poker_player ORDER BY Earnings DESC


Question:
How many flights depart from 'APG'?
Additional table information: table: flight_2

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


Question:
How many concerts are there in year 2014 or 2015?
Additional table information: table: concert_singer

Answer: SELECT COUNT(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015


Question:
What is the most commmon hometowns for teachers?
Additional table information: table: course_teach

Answer: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1


Question:
What are flight numbers of flights departing from City 'Aberdeen '?
Additional table information: table: flight_2

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


Question:
Show the student IDs and numbers of friends corresponding to each.
Additional table information: table: network_1

Answer: SELECT student_id, COUNT(*) FROM Friend GROUP BY student_id


Question:
Count the number of different templates used for documents.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT COUNT(DISTINCT template_id) FROM Documents


Question:
what is the name and nation of the singer who have a song having 'Hey' in its name?
Additional table information: table: concert_singer

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


Question:
Give the language that is spoken in the most countries.
Additional table information: table: world_1

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


Question:
What are the names and ranks of the three 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:
What are the date and the operating professional's first name of each treatment?
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 are the names and areas of countries with the top 5 largest area?
Additional table information: table: world_1

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


Question:
What country is Jetblue Airways affiliated with?
Additional table information: table: flight_2

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


Question:
How many car models are produced in the usa?
Additional table information: table: car_1

Answer: SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'


Question:
What are the full names of all players, sorted by birth date?
Additional table information: table: wta_1

Answer: SELECT first_name, last_name FROM players ORDER BY birth_date NULLS FIRST


Question:
What are the record companies of orchestras in descending order of years in which they were founded?
Additional table information: table: orchestra

Answer: SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC


Question:
For each stadium, how many concerts play there?
Additional table information: table: concert_singer

Answer: SELECT T2.name, COUNT(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id


Question:
Find the highest rank of losers in all matches.
Additional table information: table: wta_1

Answer: SELECT MIN(loser_rank) FROM matches


Question:
What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?
Additional table information: table: car_1

Answer: SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.Id, 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 GROUP BY T1.Id HAVING COUNT(*) > 3


Question:
What is the version number and template type code for the template with version number later than 5?
Additional table information: table: cre_Doc_Template_Mgt

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


Question:
What is the number of countries with 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:
Show me the cost of the most recently performed treatment.
Additional table information: table: dog_kennels

Answer: SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1


Question:
What is the car model with the highest mpg ?
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:
What are the names of conductors whose nationalities are not 'USA'?
Additional table information: table: orchestra

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


Question:
find the number of players for each country.
Additional table information: table: wta_1

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


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

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


Question:
What are the first names of all players, and their average rankings?
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 much does each charge type costs? List both charge type and amount.
Additional table information: table: dog_kennels

Answer: SELECT charge_type, charge_amount FROM Charges


Question:
Return the average attendance across all shows.
Additional table information: table: orchestra

Answer: SELECT AVG(Attendance) FROM SHOW


Question:
What are the names of high schoolers who have likes, and how many likes does each have?
Additional table information: table: network_1

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


Question:
Show the property type descriptions of properties belonging to that code.
Additional table information: table: real_estate_properties

Answer: SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code


Question:
What are the maximum and minimum share of performances whose type is not 'Live final'.
Additional table information: table: orchestra

Answer: SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> 'Live final'


Question:
Give the names of countries with English and French as 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 the countries where either English or Dutch is the official language ?
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 isofficial = 't' UNION SELECT t1.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode WHERE t2.language = 'dutch' AND isofficial = 't'


Question:
What is the document name and template id for document with description with the letter 'w' in it?
Additional table information: table: cre_Doc_Template_Mgt

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


Question:
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
Additional table information: table: battle_death

Answer: SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'


Question:
List document IDs, document names, and document descriptions for all documents.
Additional table information: table: cre_Doc_Template_Mgt

Answer: SELECT document_id, document_name, document_description FROM Documents


Question:
What other details can you tell me about students in reverse alphabetical order?
Additional table information: table: student_transcripts_tracking

Answer: SELECT other_student_details FROM Students ORDER BY other_student_details DESC


Question:
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
Additional table information: table: battle_death

Answer: SELECT name, RESULT, bulgarian_commander FROM battle EXCEPT SELECT T1.name, T1.result, T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'


Question:
How many players are there?
Additional table information: table: wta_1

Answer: SELECT COUNT(*) FROM players


Question:
How many airports do we have?
Additional table information: table: flight_2

Answer: SELECT COUNT(*) FROM AIRPORTS


Question:
List the name of singers whose citizenship is not 'France'.
Additional table information: table: singer

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


Question:
How many shops are there in each location?
Additional table information: table: employee_hire_evaluation

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


Question:
What is the name of the singer with the largest net worth?
Additional table information: table: singer

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


Question:
List the names of orchestras that have no performance.
Additional table information: table: orchestra

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


Question:
Return the grade that has the greatest number of 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 name and capacity of the stadium with the most concerts after 2013 ?
Additional table information: table: concert_singer

Answer: SELECT t2.name, t2.capacity FROM concert AS t1 JOIN stadium AS t2 ON t1.stadium_id = t2.stadium_id WHERE t1.year > 2013 GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1


Question:
What is the weekly rank for the episode 'A Love of a Lifetime'?
Additional table information: table: tvshow

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


Question:
Describe the section h.
Additional table information: table: student_transcripts_tracking

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


Question:
How many orchestras does each record company manage?
Additional table information: table: orchestra

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