minktn/spider-data huggingface dataset:
Database: student_transcripts_tracking
Question: What are the last name of the students who live in North Carolina but have not registered in any degree programs?
SQL: SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id  =  T2.address_id WHERE T2.state_province_county  =  'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id  =  T4.student_id
Database: student_transcripts_tracking
Question: Show the date and id of the transcript with at least 2 course results.
SQL: SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id HAVING count(*)  >=  2
Database: student_transcripts_tracking
Question: What is the date and id of the transcript with at least 2 courses listed?
SQL: SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id HAVING count(*)  >=  2
Database: student_transcripts_tracking
Question: What is the phone number of the man with the first name Timmothy and the last name Ward?
SQL: SELECT cell_mobile_number FROM Students WHERE first_name  =  'Timmothy' AND last_name  =  'Ward'
Database: student_transcripts_tracking
Question: What is the mobile phone number of the student named Timmothy Ward ?
SQL: select cell_mobile_number from students where first_name  =  'timmothy' and last_name  =  'ward'
Database: student_transcripts_tracking
Question: Who is the first student to register? List the first name, middle name and last name.
SQL: SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1
Database: student_transcripts_tracking
Question: What is the first, middle, and last name of the first student to register?
SQL: SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1
Database: student_transcripts_tracking
Question: Who is the earliest graduate of the school? List the first name, middle name and last name.
SQL: SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_left ASC LIMIT 1
Database: student_transcripts_tracking
Question: What is the first, middle, and last name of the earliest school graduate?
SQL: SELECT first_name ,  middle_name ,  last_name FROM Students ORDER BY date_left ASC LIMIT 1
Database: student_transcripts_tracking
Question: Whose permanent address is different from his or her current address? List his or her first name.
SQL: SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
Database: student_transcripts_tracking
Question: What is the first name of the student whose permanent address is different from his or her current one?
SQL: SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
Database: student_transcripts_tracking
Question: Which address holds the most number of students currently? List the address id and all lines.
SQL: SELECT T1.address_id ,  T1.line_1 ,  T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1
Database: student_transcripts_tracking
Question: What is the id, line 1, and line 2 of the address with the most students?
SQL: SELECT T1.address_id ,  T1.line_1 ,  T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1
Database: student_transcripts_tracking
Question: On average, when were the transcripts printed?
SQL: SELECT avg(transcript_date) FROM Transcripts
Database: student_transcripts_tracking
Question: What is the average transcript date?
SQL: SELECT avg(transcript_date) FROM Transcripts
Database: student_transcripts_tracking
Question: When is the first transcript released? List the date and details.
SQL: SELECT transcript_date ,  other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
Database: student_transcripts_tracking
Question: What is the earliest date of a transcript release, and what details can you tell me?
SQL: SELECT transcript_date ,  other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
Database: student_transcripts_tracking
Question: How many transcripts are released?
SQL: SELECT count(*) FROM Transcripts
Database: student_transcripts_tracking
Question: How many transcripts are listed?
SQL: SELECT count(*) FROM Transcripts
Database: student_transcripts_tracking
Question: What is the last transcript release date?
SQL: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
Database: student_transcripts_tracking
Question: When was the last transcript released?
SQL: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
Database: student_transcripts_tracking
Question: How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
SQL: SELECT count(*) ,  student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
Database: student_transcripts_tracking
Question: What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?
SQL: SELECT count(*) ,  student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
Database: student_transcripts_tracking
Question: Show the date of the transcript which shows the least number of results, also list the id.
SQL: SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1
Database: student_transcripts_tracking
Question: What is the date and id of the transcript with the least number of results?
SQL: SELECT T2.transcript_date ,  T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id  =  T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1
Database: student_transcripts_tracking
Question: Find the semester when both Master students and Bachelor students got enrolled in.
SQL: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Bachelor'
Database: student_transcripts_tracking
Question: What is the id of the semester that had both Masters and Bachelors students enrolled?
SQL: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Bachelor'
Database: student_transcripts_tracking
Question: How many different addresses do the students currently live?
SQL: SELECT count(DISTINCT current_address_id) FROM Students
Database: student_transcripts_tracking
Question: What are the different addresses that have students living there?
SQL: SELECT count(DISTINCT current_address_id) FROM Students
Database: student_transcripts_tracking
Question: List all the student details in reversed lexicographical order.
SQL: SELECT other_student_details FROM Students ORDER BY other_student_details DESC
Database: student_transcripts_tracking
Question: What other details can you tell me about students in reverse alphabetical order?
SQL: SELECT other_student_details FROM Students ORDER BY other_student_details DESC
Database: student_transcripts_tracking
Question: Describe the section h.
SQL: SELECT section_description FROM Sections WHERE section_name  =  'h'
Database: student_transcripts_tracking
Question: What is the description for the section named h?
SQL: SELECT section_description FROM Sections WHERE section_name  =  'h'
Database: student_transcripts_tracking
Question: Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
SQL: select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id  =  t2.address_id where t2.country  =  'haiti' or t1.cell_mobile_number  =  '09700166582'
Database: student_transcripts_tracking
Question: What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?
SQL: select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id  =  t2.address_id where t2.country  =  'haiti' or t1.cell_mobile_number  =  '09700166582'
Database: tvshow
Question: List the title of all cartoons in alphabetical order.
SQL: SELECT Title FROM Cartoon ORDER BY title
Database: tvshow
Question: What are the titles of the cartoons sorted alphabetically?
SQL: SELECT Title FROM Cartoon ORDER BY title
Database: tvshow
Question: list all cartoon titles and their directors ordered by their air date
SQL: SELECT title ,  Directed_by FROM Cartoon ORDER BY Original_air_date
Database: tvshow
Question: What is the name and directors of all the cartoons that are ordered by air date?
SQL: SELECT title ,  Directed_by FROM Cartoon ORDER BY Original_air_date
Database: tvshow
Question: List each language and the number of TV Channels using it.
SQL: SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE
Database: tvshow
Question: For each language, list the number of TV Channels that use it.
SQL: SELECT LANGUAGE ,  count(*) FROM TV_Channel GROUP BY LANGUAGE
Database: tvshow
Question: List the Episode of all TV series sorted by rating.
SQL: SELECT Episode FROM TV_series ORDER BY rating
Database: tvshow
Question: What are all of the episodes ordered by ratings?
SQL: SELECT Episode FROM TV_series ORDER BY rating
Database: tvshow
Question: Find the number of cartoons directed by each of the listed directors.
SQL: SELECT count(*) ,  Directed_by FROM cartoon GROUP BY Directed_by
Database: tvshow
Question: How many cartoons did each director create?
SQL: SELECT count(*) ,  Directed_by FROM cartoon GROUP BY Directed_by
Database: tvshow
Question: Find the production code and channel of the most recently aired cartoon .
SQL: select production_code ,  channel from cartoon order by original_air_date desc limit 1
Database: tvshow
Question: What is the produdction code and channel of the most recent cartoon ?
SQL: select production_code ,  channel from cartoon order by original_air_date desc limit 1
Database: tvshow
Question: Find the package choice and series name of the TV channel that has high definition TV.
SQL: SELECT package_option ,  series_name FROM TV_Channel WHERE hight_definition_TV  =  "yes"
Database: tvshow
Question: What are the package options and the name of the series for the TV Channel that supports high definition TV?
SQL: SELECT package_option ,  series_name FROM TV_Channel WHERE hight_definition_TV  =  "yes"
Database: tvshow
Question: which countries' tv channels are playing some cartoon written by Todd Casey?
SQL: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by  =  'Todd Casey'
Database: tvshow
Question: What are the countries that have cartoons on TV that were written by Todd Casey?
SQL: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by  =  'Todd Casey'
Database: tvshow
Question: which countries' tv channels are not playing any cartoon written by Todd Casey?
SQL: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by  =  'Todd Casey'
Database: tvshow
Question: What are the countries that are not playing cartoons written by Todd Casey?
SQL: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by  =  'Todd Casey'
Database: tvshow
Question: Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
SQL: SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Michael Chang' INTERSECT SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Ben Jones'
Database: tvshow
Question: What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?
SQL: SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Michael Chang' INTERSECT SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Ben Jones'
Database: tvshow
Question: find the pixel aspect ratio and nation of the tv channels that do not use English.
SQL: SELECT Pixel_aspect_ratio_PAR ,  country FROM tv_channel WHERE LANGUAGE != 'English'
Database: tvshow
Question: What is the pixel aspect ratio and country of origin for all TV channels that do not use English?
SQL: SELECT Pixel_aspect_ratio_PAR ,  country FROM tv_channel WHERE LANGUAGE != 'English'
Database: tvshow
Question: find id of the tv channels that from the countries where have more than two tv channels.
SQL: SELECT id FROM tv_channel GROUP BY country HAVING count(*)  >  2
Database: tvshow
Question: What are the ids of all tv channels that have more than 2 TV channels?
SQL: SELECT id FROM tv_channel GROUP BY country HAVING count(*)  >  2
Database: tvshow
Question: find the id of tv channels that do not play any cartoon directed by Ben Jones.
SQL: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones'
Database: tvshow
Question: What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?
SQL: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones'
Database: tvshow
Question: find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
SQL: SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones')
Database: tvshow
Question: What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?
SQL: SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones')
Database: poker_player
Question: How many poker players are there?
SQL: SELECT count(*) FROM poker_player
Database: poker_player
Question: Count the number of poker players.
SQL: SELECT count(*) FROM poker_player
Database: poker_player
Question: List the earnings of poker players in descending order.
SQL: SELECT Earnings FROM poker_player ORDER BY Earnings DESC
Database: poker_player
Question: What are the earnings of poker players, ordered descending by value?
SQL: SELECT Earnings FROM poker_player ORDER BY Earnings DESC
Database: poker_player
Question: List the final tables made and the best finishes of poker players.
SQL: SELECT Final_Table_Made ,  Best_Finish FROM poker_player
Database: poker_player
Question: What are the final tables made and best finishes for all poker players?
SQL: SELECT Final_Table_Made ,  Best_Finish FROM poker_player
Database: poker_player
Question: What is the average earnings of poker players?
SQL: SELECT avg(Earnings) FROM poker_player
Database: poker_player
Question: Return the average earnings across all poker players.
SQL: SELECT avg(Earnings) FROM poker_player
Database: poker_player
Question: What is the money rank of the poker player with the highest earnings?
SQL: SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
Database: poker_player
Question: Return the money rank of the player with the greatest earnings.
SQL: SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
Database: poker_player
Question: What is the maximum number of final tables made among poker players with earnings less than 200000?
SQL: SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings  <  200000
Database: poker_player
Question: Return the maximum final tables made across all poker players who have earnings below 200000.
SQL: SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings  <  200000
Database: poker_player
Question: What are the names of poker players?
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID
Database: poker_player
Question: Return the names of all the poker players.
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID
Database: poker_player
Question: What are the names of poker players whose earnings is higher than 300000?
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Earnings  >  300000
Database: poker_player
Question: Give the names of poker players who have earnings above 300000.
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Earnings  >  300000
Database: poker_player
Question: List the names of poker players ordered by the final tables made in ascending order.
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Final_Table_Made
Database: poker_player
Question: What are the names of poker players, ordered ascending by the number of final tables they have made?
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Final_Table_Made
Database: poker_player
Question: What is the birth date of the poker player with the lowest earnings?
SQL: 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 LIMIT 1
Database: poker_player
Question: Return the birth date of the poker player with the lowest earnings.
SQL: 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 LIMIT 1
Database: poker_player
Question: What is the money rank of the tallest poker player?
SQL: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Height DESC LIMIT 1
Database: poker_player
Question: Return the money rank of the poker player with the greatest height.
SQL: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Height DESC LIMIT 1
Database: poker_player
Question: What is the average earnings of poker players with height higher than 200?
SQL: SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Height  >  200
Database: poker_player
Question: Give average earnings of poker players who are taller than 200.
SQL: SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Height  >  200
Database: poker_player
Question: What are the names of poker players in descending order of earnings?
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Earnings DESC
Database: poker_player
Question: Return the names of poker players sorted by their earnings descending.
SQL: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Earnings DESC
Database: poker_player
Question: What are different nationalities of people and the corresponding number of people from each nation?
SQL: SELECT Nationality ,  COUNT(*) FROM people GROUP BY Nationality
Database: poker_player
Question: How many people are there of each nationality?
SQL: SELECT Nationality ,  COUNT(*) FROM people GROUP BY Nationality
Database: poker_player
Question: What is the most common nationality of people?
SQL: SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: poker_player
Question: Give the nationality that is most common across all people.
SQL: SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: poker_player
Question: What are the nationalities that are shared by at least two people?
SQL: SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*)  >=  2
Database: poker_player
Question: Return the nationalities for which there are two or more people.
SQL: SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*)  >=  2
Database: poker_player
Question: List the names and birth dates of people in ascending alphabetical order of name.
SQL: SELECT Name ,  Birth_Date FROM people ORDER BY Name ASC
Database: poker_player
Question: What are the names and birth dates of people, ordered by their names in alphabetical order?
SQL: SELECT Name ,  Birth_Date FROM people ORDER BY Name ASC
Database: poker_player
Question: Show names of people whose nationality is not "Russia".
SQL: SELECT Name FROM people WHERE Nationality != "Russia"
Database: poker_player
Question: What are the names of people who are not from Russia?
SQL: SELECT Name FROM people WHERE Nationality != "Russia"
Database: poker_player
Question: List the names of people that are not poker players.
SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)
Database: poker_player
Question: What are the names of people who do not play poker?
SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)
Database: poker_player
Question: How many distinct nationalities are there?
SQL: SELECT count(DISTINCT Nationality) FROM people
Database: poker_player
Question: Count the number of different nationalities.
SQL: SELECT count(DISTINCT Nationality) FROM people
Database: voter_1
Question: How many states are there?
SQL: SELECT count(*) FROM area_code_state
Database: voter_1
Question: List the contestant numbers and names, ordered by contestant name descending.
SQL: SELECT contestant_number ,  contestant_name FROM contestants ORDER BY contestant_name DESC
Database: voter_1
Question: List the vote ids, phone numbers and states of all votes.
SQL: SELECT vote_id ,  phone_number ,  state FROM votes
Database: voter_1
Question: What are the maximum and minimum values of area codes?
SQL: SELECT max(area_code) ,  min(area_code) FROM area_code_state
Database: voter_1
Question: What is last date created of votes from the state 'CA'?
SQL: SELECT max(created) FROM votes WHERE state  =  'CA'
Database: voter_1
Question: What are the names of the contestants whose names are not 'Jessie Alloway'
SQL: SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'
Database: voter_1
Question: What are the distinct states and create time of all votes?
SQL: SELECT DISTINCT state ,  created FROM votes
Database: voter_1
Question: What are the contestant numbers and names of the contestants who had at least two votes?
SQL: SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number HAVING count(*)  >=  2
Database: voter_1
Question: Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
SQL: SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
Database: voter_1
Question: What are the number of votes from state 'NY' or 'CA'?
SQL: SELECT count(*) FROM votes WHERE state  =  'NY' OR state  =  'CA'
Database: voter_1
Question: How many contestants did not get voted?
SQL: SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
Database: voter_1
Question: What is the area code in which the most voters voted?
SQL: SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state  =  T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1
Database: voter_1
Question: What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
SQL: SELECT T2.created ,  T2.state ,  T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number WHERE T1.contestant_name  =  'Tabatha Gehling'
Database: voter_1
Question: List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
SQL: SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Kelly Clauss'
Database: voter_1
Question: Return the names of the contestants whose names contain the substring 'Al' .
SQL: select contestant_name from contestants where contestant_name like "%al%"
Database: world_1
Question: What are the names of all the countries that became independent after 1950?
SQL: SELECT Name FROM country WHERE IndepYear  >  1950
Database: world_1
Question: Give the names of the nations that were founded after 1950.
SQL: SELECT Name FROM country WHERE IndepYear  >  1950
Database: world_1
Question: How many countries have a republic as their form of government?
SQL: SELECT count(*) FROM country WHERE GovernmentForm  =  "Republic"
Database: world_1
Question: How many countries have governments that are republics?
SQL: SELECT count(*) FROM country WHERE GovernmentForm  =  "Republic"
Database: world_1
Question: What is the total surface area of the countries in the Caribbean region?
SQL: SELECT sum(SurfaceArea) FROM country WHERE Region  =  "Caribbean"
Database: world_1
Question: How much surface area do the countires in the Carribean cover together?
SQL: SELECT sum(SurfaceArea) FROM country WHERE Region  =  "Caribbean"
Database: world_1
Question: Which continent is Anguilla in?
SQL: SELECT Continent FROM country WHERE Name  =  "Anguilla"
Database: world_1
Question: What is the continent name which Anguilla belongs to?
SQL: SELECT Continent FROM country WHERE Name  =  "Anguilla"
Database: world_1
Question: Which region is the city Kabul located in?
SQL: SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Name  =  "Kabul"
Database: world_1
Question: What region is Kabul in?
SQL: SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Name  =  "Kabul"
Database: world_1
Question: Which language is the most popular in Aruba?
SQL: 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
Database: world_1
Question: What language is predominantly spoken in Aruba?
SQL: 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
Database: world_1
Question: What are the population and life expectancies in Brazil?
SQL: SELECT Population ,  LifeExpectancy FROM country WHERE Name  =  "Brazil"
Database: world_1
Question: Give me Brazil’s population and life expectancies.
SQL: SELECT Population ,  LifeExpectancy FROM country WHERE Name  =  "Brazil"
Database: world_1
Question: What are the region and population of Angola?
SQL: SELECT Population ,  Region FROM country WHERE Name  =  "Angola"
Database: world_1
Question: What region does Angola belong to and what is its population?
SQL: SELECT Population ,  Region FROM country WHERE Name  =  "Angola"
Database: world_1
Question: What is the average expected life expectancy for countries in the region of Central Africa?
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Region  =  "Central Africa"
Database: world_1
Question: How long is the people’s average life expectancy in Central Africa?
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Region  =  "Central Africa"
Database: world_1
Question: What is the name of country that has the shortest life expectancy in Asia?
SQL: SELECT Name FROM country WHERE Continent  =  "Asia" ORDER BY LifeExpectancy LIMIT 1
Database: world_1
Question: Give the name of the country in Asia with the lowest life expectancy.
SQL: SELECT Name FROM country WHERE Continent  =  "Asia" ORDER BY LifeExpectancy LIMIT 1
Database: world_1
Question: What is the total population and maximum GNP in Asia?
SQL: SELECT sum(Population) ,  max(GNP) FROM country WHERE Continent  =  "Asia"
Database: world_1
Question: How many people live in Asia, and what is the largest GNP among them?
SQL: SELECT sum(Population) ,  max(GNP) FROM country WHERE Continent  =  "Asia"
Database: world_1
Question: What is the average life expectancy in African countries that are republics?
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Continent  =  "Africa" AND GovernmentForm  =  "Republic"
Database: world_1
Question: Give the average life expectancy for countries in Africa which are republics?
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Continent  =  "Africa" AND GovernmentForm  =  "Republic"
Database: world_1
Question: What is the total surface area of the continents Asia and Europe?
SQL: SELECT sum(SurfaceArea) FROM country WHERE Continent  =  "Asia" OR Continent  =  "Europe"
Database: world_1
Question: Give the total surface area covered by countries in Asia or Europe.
SQL: SELECT sum(SurfaceArea) FROM country WHERE Continent  =  "Asia" OR Continent  =  "Europe"
Database: world_1
Question: How many people live in Gelderland district?
SQL: SELECT sum(Population) FROM city WHERE District  =  "Gelderland"
Database: world_1
Question: What is the total population of Gelderland district?
SQL: SELECT sum(Population) FROM city WHERE District  =  "Gelderland"
Database: world_1
Question: What is the average GNP and total population in all nations whose government is US territory?
SQL: SELECT avg(GNP) ,  sum(population) FROM country WHERE GovernmentForm  =  "US Territory"
Database: world_1
Question: Give the mean GNP and total population of nations which are considered US territory.
SQL: SELECT avg(GNP) ,  sum(population) FROM country WHERE GovernmentForm  =  "US Territory"
Database: world_1
Question: How many unique languages are spoken in the world?
SQL: SELECT count(DISTINCT LANGUAGE) FROM countrylanguage
Database: world_1
Question: What is the number of distinct languages used around the world?
SQL: SELECT count(DISTINCT LANGUAGE) FROM countrylanguage
Database: world_1
Question: How many type of governments are in Africa?
SQL: SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent  =  "Africa"
Database: world_1
Question: How many different forms of governments are there in Africa?
SQL: SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent  =  "Africa"
Database: world_1
Question: What is the total number of languages used in Aruba?
SQL: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Aruba"
Database: world_1
Question: How many languages are spoken in Aruba?
SQL: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Aruba"
Database: world_1
Question: How many official languages does Afghanistan have?
SQL: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Afghanistan" AND IsOfficial  =  "T"
Database: world_1
Question: How many official languages are spoken in Afghanistan?
SQL: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Afghanistan" AND IsOfficial  =  "T"
Database: world_1
Question: What is name of the country that speaks the largest number of languages?
SQL: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
Database: world_1
Question: Give the name of the nation that uses the greatest amount of languages.
SQL: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
Database: world_1
Question: Which continent has the most diverse languages?
SQL: 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
Database: world_1
Question: Which continent speaks the most languages?
SQL: 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
Database: world_1
Question: How many countries speak both English and Dutch?
SQL: 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")
Database: world_1
Question: What is the number of nations that use English and Dutch?
SQL: 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")
Database: world_1
Question: What are the names of nations speak both English and French?
SQL: 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  =  "French"
Database: world_1
Question: Give the names of nations that speak both English and French.
SQL: 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  =  "French"
Database: world_1
Question: What are the names of nations where both English and French are official languages?
SQL: 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"
Database: world_1
Question: Give the names of countries with English and French as official languages.
SQL: 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"
Database: world_1
Question: What is the number of distinct continents where Chinese is spoken?
SQL: SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "Chinese"
Database: world_1
Question: How many continents speak Chinese?
SQL: SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "Chinese"
Database: world_1
Question: What are the regions that use English or Dutch?
SQL: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" OR T2.Language  =  "Dutch"
Database: world_1
Question: Which regions speak Dutch or English?
SQL: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" OR T2.Language  =  "Dutch"
Database: world_1
Question: What are the countries where either English or Dutch is the official language ?
SQL: 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"
Database: world_1
Question: Which countries have either English or Dutch as an official language?
SQL: SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" AND IsOfficial  =  "T" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "Dutch" AND IsOfficial  =  "T"
Database: world_1
Question: Which language is the most popular on the Asian continent?
SQL: 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
Database: world_1
Question: What is the language that is used by the largest number of Asian nations?
SQL: 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
Database: world_1
Question: Which languages are spoken by only one country in republic governments?
SQL: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.GovernmentForm  =  "Republic" GROUP BY T2.Language HAVING COUNT(*)  =  1
Database: world_1
Question: What languages are only used by a single country with a republic government?
SQL: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.GovernmentForm  =  "Republic" GROUP BY T2.Language HAVING COUNT(*)  =  1
Database: world_1
Question: Find the city with the largest population that uses English.
SQL: SELECT T1.Name ,  T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode  =  T2.CountryCode WHERE T2.Language  =  "English" ORDER BY T1.Population DESC LIMIT 1
Database: world_1
Question: What is the most populace city that speaks English?
SQL: SELECT T1.Name ,  T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode  =  T2.CountryCode WHERE T2.Language  =  "English" ORDER BY T1.Population DESC LIMIT 1
Database: world_1
Question: Find the name, population and expected life length of asian country with the largest area?
SQL: SELECT Name ,  Population ,  LifeExpectancy FROM country WHERE Continent  =  "Asia" ORDER BY SurfaceArea DESC LIMIT 1
Database: world_1
Question: What are the name, population, and life expectancy of the largest Asian country by land?
SQL: SELECT Name ,  Population ,  LifeExpectancy FROM country WHERE Continent  =  "Asia" ORDER BY SurfaceArea DESC LIMIT 1
Database: world_1
Question: What is average life expectancy in the countries where English is not the official language?
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Name NOT 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")
Database: world_1
Question: Give the mean life expectancy of countries in which English is not the official language.
SQL: SELECT avg(LifeExpectancy) FROM country WHERE Name NOT 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")
Database: world_1
Question: What is the total number of people living in the nations that do not use English?
SQL: SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English")
Database: world_1
Question: How many people live in countries that do not speak English?
SQL: SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English")
Database: world_1
Question: What is the official language spoken in the country whose head of state is Beatrix?
SQL: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.HeadOfState  =  "Beatrix" AND T2.IsOfficial  =  "T"
Database: world_1
Question: What is the official language used in the country the name of whose head of state is Beatrix.
SQL: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.HeadOfState  =  "Beatrix" AND T2.IsOfficial  =  "T"
Database: world_1
Question: What is the total number of unique official languages spoken in the countries that are founded before 1930?
SQL: 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"
Database: world_1
Question: For the countries founded before 1930, what is the total number of distinct official languages?
SQL: 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"
Database: world_1
Question: What are the countries that have greater surface area than any country in Europe?
SQL: SELECT Name FROM country WHERE SurfaceArea  >  (SELECT min(SurfaceArea) FROM country WHERE Continent  =  "Europe")
Database: world_1
Question: Which countries have greater area than that of any country in Europe?
SQL: SELECT Name FROM country WHERE SurfaceArea  >  (SELECT min(SurfaceArea) FROM country WHERE Continent  =  "Europe")
Database: world_1
Question: What are the African countries that have a  population less than any country in Asia?
SQL: SELECT Name FROM country WHERE Continent  =  "Africa"  AND population  <  (SELECT max(population) FROM country WHERE Continent  =  "Asia")
Database: world_1
Question: Which African countries have a smaller population than that of any country in Asia?
SQL: SELECT Name FROM country WHERE Continent  =  "Africa"  AND population  <  (SELECT min(population) FROM country WHERE Continent  =  "Asia")
Database: world_1
Question: Which Asian countries have a population that is larger than any country in Africa?
SQL: SELECT Name FROM country WHERE Continent  =  "Asia"  AND population  >  (SELECT max(population) FROM country WHERE Continent  =  "Africa")
Database: world_1
Question: What are the Asian countries which have a population larger than that of any country in Africa?
SQL: SELECT Name FROM country WHERE Continent  =  "Asia"  AND population  >  (SELECT min(population) FROM country WHERE Continent  =  "Africa")
Database: world_1
Question: What are the country codes for countries that do not speak English?
SQL: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
Database: world_1
Question: Return the country codes for countries that do not speak English.
SQL: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
Database: world_1
Question: What are the country codes of countries where people use languages other than English?
SQL: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != "English"
Database: world_1
Question: Give the country codes for countries in which people speak langauges that are not English.
SQL: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != "English"
Database: world_1
Question: What are the codes of the countries that do not speak English and whose government forms are not Republic?
SQL: SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
Database: world_1
Question: Return the codes of countries that do not speak English and do not have Republics for governments.
SQL: SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
Database: world_1
Question: Which cities are in European countries where English is not the official language?
SQL: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode  =  T1.Code WHERE T1.Continent  =  'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code  =  T4.CountryCode WHERE T4.IsOfficial  =  'T' AND T4.Language  =  'English')
Database: world_1
Question: What are the names of cities in Europe for which English is not the official language?
SQL: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode  =  T1.Code WHERE T1.Continent  =  'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code  =  T4.CountryCode WHERE T4.IsOfficial  =  'T' AND T4.Language  =  'English')
Database: world_1
Question: Which unique cities are in Asian countries where Chinese is the official language ?
SQL: select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code  =  t2.countrycode join city as t3 on t1.code  =  t3.countrycode where t2.isofficial  =  't' and t2.language  =  'chinese' and t1.continent  =  "asia"
Database: world_1
Question: Return the different names of cities that are in Asia and for which Chinese is the official language.
SQL: SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode JOIN city AS T3 ON T1.Code  =  T3.CountryCode WHERE T2.IsOfficial  =  'T' AND T2.Language  =  'Chinese' AND T1.Continent  =  "Asia"
Database: world_1
Question: What are the name, independence year, and surface area of the country with the smallest population?
SQL: SELECT Name ,  SurfaceArea ,  IndepYear FROM country ORDER BY Population LIMIT 1
Database: world_1
Question: Give the name, year of independence, and surface area of the country that has the lowest population.
SQL: SELECT Name ,  SurfaceArea ,  IndepYear FROM country ORDER BY Population LIMIT 1
Database: world_1
Question: What are the population, name and leader of the country with the largest area?
SQL: SELECT Name ,  population ,  HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
Database: world_1
Question: Give the name, population, and head of state for the country that has the largest area.
SQL: SELECT Name ,  population ,  HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
Database: world_1
Question: Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
SQL: 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
Database: world_1
Question: What are the names of countries that speak more than 2 languages, as well as how many languages they speak?
SQL: 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
Database: world_1
Question: Find the number of cities in each district whose population is greater than the average population of cities?
SQL: SELECT count(*) ,  District FROM city WHERE Population  >  (SELECT avg(Population) FROM city) GROUP BY District
Database: world_1
Question: How many cities in each district have a population that is above the average population across all cities?
SQL: SELECT count(*) ,  District FROM city WHERE Population  >  (SELECT avg(Population) FROM city) GROUP BY District
Database: world_1
Question: Find the government form name and total population for each government form whose average life expectancy is longer than 72.
SQL: SELECT sum(Population) ,  GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy)  >  72
Database: world_1
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?
SQL: SELECT sum(Population) ,  GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy)  >  72
Database: world_1
Question: Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?
SQL: SELECT sum(Population) ,  avg(LifeExpectancy) ,  Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy)  <  72