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

Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)

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: Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.

Context: CREATE TABLE Degree_Programs (degree_program_id VARCHAR, degree_summary_name VARCHAR); CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR, degree_program_id VARCHAR)

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: Find the kind of program which most number of students are enrolled in?

Context: CREATE TABLE Student_Enrolment (degree_program_id VARCHAR); CREATE TABLE Degree_Programs (degree_summary_name VARCHAR, degree_program_id VARCHAR)

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: Find the program which most number of students are enrolled in. List both the id and the summary.

Context: CREATE TABLE Degree_Programs (degree_program_id VARCHAR, degree_summary_name VARCHAR); CREATE TABLE Student_Enrolment (degree_program_id VARCHAR)

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 student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.

Context: CREATE TABLE Students (student_id VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)

SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1


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

Context: CREATE TABLE Student_Enrolment (semester_name VARCHAR, semester_id VARCHAR); CREATE TABLE Semesters (semester_name VARCHAR, semester_id VARCHAR)

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


Question: What are all the course names of the courses which ever have students enrolled in?

Context: CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Enrolment_Courses (course_id VARCHAR)

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


Question: What's the name of the course with most number of enrollments?

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: Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.

Context: CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Students (last_name VARCHAR, current_address_id VARCHAR); CREATE TABLE Students (last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)

SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id


Question: Show the date and id of the transcript with at least 2 course results.

Context: CREATE TABLE Transcript_Contents (transcript_id VARCHAR); CREATE TABLE Transcripts (transcript_date VARCHAR, transcript_id VARCHAR)

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 phone number of the man with the first name Timmothy and the last name Ward?

Context: CREATE TABLE Students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR)

SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'


Question: What is the mobile phone number of the student named Timmothy Ward ?

Context: CREATE TABLE students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR)

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


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

Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_first_registered VARCHAR)

SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered LIMIT 1


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

Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_left VARCHAR)

SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left LIMIT 1


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

Context: CREATE TABLE Students (first_name VARCHAR, current_address_id VARCHAR, permanent_address_id VARCHAR)

SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id


Question: Which address holds the most number of students currently? List the address id and all lines.

Context: CREATE TABLE Addresses (address_id VARCHAR, line_1 VARCHAR, line_2 VARCHAR); CREATE TABLE Students (current_address_id VARCHAR)

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: On average, when were the transcripts printed?

Context: CREATE TABLE Transcripts (transcript_date INTEGER)

SELECT AVG(transcript_date) FROM Transcripts


Question: When is the first transcript released? List the date and details.

Context: CREATE TABLE Transcripts (transcript_date VARCHAR, other_details VARCHAR)

SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date LIMIT 1


Question: How many transcripts are released?

Context: CREATE TABLE Transcripts (Id VARCHAR)


Question: What is the last transcript release date?

Context: CREATE TABLE Transcripts (transcript_date VARCHAR)

SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1


Question: How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.

Context: CREATE TABLE Transcript_Contents (student_course_id VARCHAR)

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


Question: Show the date of the transcript which shows the least number of results, also list the id.

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(*) LIMIT 1


Question: Find the semester when both Master students and Bachelor students got enrolled in.

Context: CREATE TABLE Degree_Programs (degree_program_id VARCHAR); CREATE TABLE Student_Enrolment (semester_id VARCHAR, degree_program_id VARCHAR)

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: How many different addresses do the students currently live?

Context: CREATE TABLE Students (current_address_id VARCHAR)

SELECT COUNT(DISTINCT current_address_id) FROM Students


Question: List all the student details in reversed lexicographical order.

Context: CREATE TABLE Students (other_student_details VARCHAR)

SELECT other_student_details FROM Students ORDER BY other_student_details DESC


Question: Describe the section h.

Context: CREATE TABLE Sections (section_description VARCHAR, section_name VARCHAR)

SELECT section_description FROM Sections WHERE section_name = 'h'


Question: Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .

Context: CREATE TABLE students (first_name VARCHAR, permanent_address_id VARCHAR, cell_mobile_number VARCHAR); CREATE TABLE addresses (address_id VARCHAR, country VARCHAR)

SELECT t1.first_name FROM students AS t1 JOIN addresses AS t2 ON t1.permanent_address_id = t2.address_id WHERE t2.country = 'haiti' OR t1.cell_mobile_number = '09700166582'


Question: List the title of all cartoons in alphabetical order.

Context: CREATE TABLE Cartoon (Title VARCHAR, title VARCHAR)

SELECT Title FROM Cartoon ORDER BY title


Question: List all cartoon directed by "Ben Jones".

Context: CREATE TABLE Cartoon (Title VARCHAR, Directed_by VARCHAR)

SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones"


Question: How many cartoons were written by "Joseph Kuhr"?

Context: CREATE TABLE Cartoon (Written_by VARCHAR)

SELECT COUNT(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"


Question: list all cartoon titles and their directors ordered by their air date

Context: CREATE TABLE Cartoon (title VARCHAR, Directed_by VARCHAR, Original_air_date VARCHAR)

SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date


Question: List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".

SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"


Question: Which country has the most of TV Channels? List the country and number of TV Channels it has.

Context: CREATE TABLE TV_Channel (Country VARCHAR)

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


Question: List the number of different series names and contents in the TV Channel table.

Context: CREATE TABLE TV_Channel (series_name VARCHAR, content VARCHAR)

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


Question: What is the content of TV Channel with serial name "Sky Radio"?

Context: CREATE TABLE TV_Channel (Content VARCHAR, series_name VARCHAR)

SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio"


Question: What is the Package Option of TV Channel with serial name "Sky Radio"?

Context: CREATE TABLE TV_Channel (Package_Option VARCHAR, series_name VARCHAR)

SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio"


Question: How many TV Channel using language English?

Context: CREATE TABLE TV_Channel (LANGUAGE VARCHAR)

SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = "English"


Question: List the language used least number of TV Channel. List language and number of TV Channel.

SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) LIMIT 1


Question: List each language and the number of TV Channels using it.

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


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

Context: CREATE TABLE Cartoon (Channel VARCHAR, Title VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR)

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: List the title of all  Cartoons showed on TV Channel with series name "Sky Radio".

Context: CREATE TABLE Cartoon (Title VARCHAR, Channel VARCHAR); CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR)

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


Question: List the Episode of all TV series sorted by rating.

Context: CREATE TABLE TV_series (Episode VARCHAR, rating VARCHAR)

SELECT Episode FROM TV_series ORDER BY rating


Question: List top 3 highest Rating  TV series. List the TV series's Episode and Rating.

Context: CREATE TABLE TV_series (Episode VARCHAR, Rating VARCHAR)

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


Question: What is minimum and maximum share of TV series?

Context: CREATE TABLE TV_series (SHARE INTEGER)

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


Question: What is the air date of TV series with Episode "A Love of a Lifetime"?

Context: CREATE TABLE TV_series (Air_Date VARCHAR, Episode VARCHAR)

SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"


Question: What is Weekly Rank of TV series with Episode "A Love of a Lifetime"?

Context: CREATE TABLE TV_series (Weekly_Rank VARCHAR, Episode VARCHAR)

SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime"


Question: What is the TV Channel of TV series with Episode "A Love of a Lifetime"? List the TV Channel's series name.

Context: CREATE TABLE TV_series (Channel VARCHAR, Episode VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR)

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: List the Episode of all  TV series showed on TV Channel with series name "Sky Radio".

Context: CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR); CREATE TABLE TV_series (Episode VARCHAR, Channel VARCHAR)

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: Find the number of cartoons directed by each of the listed directors.

Context: CREATE TABLE cartoon (Directed_by VARCHAR)

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


Question: Find the production code and channel of the most recently aired cartoon .

Context: CREATE TABLE cartoon (production_code VARCHAR, channel VARCHAR, original_air_date VARCHAR)

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


Question: Find the package choice and series name of the TV channel that has high definition TV.

Context: CREATE TABLE TV_Channel (package_option VARCHAR, series_name VARCHAR, hight_definition_TV VARCHAR)

SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes"


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

Context: CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)

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


Question: which countries' tv channels are not playing any cartoon written by Todd Casey?

Context: CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE TV_Channel (country VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)

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


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

Context: CREATE TABLE TV_Channel (series_name VARCHAR, country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, directed_by VARCHAR)

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: find the pixel aspect ratio and nation of the tv channels that do not use English.

Context: CREATE TABLE tv_channel (Pixel_aspect_ratio_PAR VARCHAR, country VARCHAR, LANGUAGE VARCHAR)

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


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

Context: CREATE TABLE tv_channel (id VARCHAR, country VARCHAR)

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


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

Context: CREATE TABLE TV_Channel (id VARCHAR, channel VARCHAR, directed_by VARCHAR); CREATE TABLE cartoon (id VARCHAR, channel VARCHAR, directed_by VARCHAR)

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


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

Context: CREATE TABLE cartoon (package_option VARCHAR, id VARCHAR, channel VARCHAR, directed_by VARCHAR); CREATE TABLE TV_Channel (package_option VARCHAR, id VARCHAR, channel VARCHAR, directed_by VARCHAR)

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


Question: How many poker players are there?

Context: CREATE TABLE poker_player (Id VARCHAR)


Question: List the earnings of poker players in descending order.

Context: CREATE TABLE poker_player (Earnings VARCHAR)

SELECT Earnings FROM poker_player ORDER BY Earnings DESC


Question: List the final tables made and the best finishes of poker players.

Context: CREATE TABLE poker_player (Final_Table_Made VARCHAR, Best_Finish VARCHAR)

SELECT Final_Table_Made, Best_Finish FROM poker_player


Question: What is the average earnings of poker players?

Context: CREATE TABLE poker_player (Earnings INTEGER)


Question: What is the money rank of the poker player with the highest earnings?

Context: CREATE TABLE poker_player (Money_Rank VARCHAR, Earnings VARCHAR)

SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1


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

Context: CREATE TABLE poker_player (Final_Table_Made INTEGER, Earnings INTEGER)

SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000


Question: What are the names of poker players?

Context: CREATE TABLE poker_player (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)

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


Question: What are the names of poker players whose earnings is higher than 300000?

Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings INTEGER); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)

SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000


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

Context: CREATE TABLE poker_player (People_ID VARCHAR, Final_Table_Made VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)

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


Question: What is the birth date of the poker player with the lowest earnings?

Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, People_ID VARCHAR)

SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings LIMIT 1


Question: What is the money rank of the tallest poker player?

Context: CREATE TABLE people (People_ID VARCHAR, Height VARCHAR); CREATE TABLE poker_player (Money_Rank VARCHAR, People_ID VARCHAR)

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


Question: What is the average earnings of poker players with height higher than 200?

Context: CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE poker_player (Earnings INTEGER, People_ID VARCHAR)

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 are the names of poker players in descending order of earnings?

Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)

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


Question: What are different nationalities of people and the corresponding number of people from each nation?

Context: CREATE TABLE people (Nationality VARCHAR)

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


Question: What is the most common nationality of people?

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


Question: What are the nationalities that are shared by at least two people?

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


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

Context: CREATE TABLE people (Name VARCHAR, Birth_Date VARCHAR)

SELECT Name, Birth_Date FROM people ORDER BY Name


Question: Show names of people whose nationality is not "Russia".

Context: CREATE TABLE people (Name VARCHAR, Nationality VARCHAR)

SELECT Name FROM people WHERE Nationality <> "Russia"


Question: List the names of people that are not poker players.

Context: CREATE TABLE poker_player (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)

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


Question: How many distinct nationalities are there?

SELECT COUNT(DISTINCT Nationality) FROM people


Question: How many states are there?

Context: CREATE TABLE area_code_state (Id VARCHAR)


Question: List the contestant numbers and names, ordered by contestant name descending.

Context: CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)

SELECT contestant_number, contestant_name FROM contestants ORDER BY contestant_name DESC


Question: List the vote ids, phone numbers and states of all votes.

Context: CREATE TABLE votes (vote_id VARCHAR, phone_number VARCHAR, state VARCHAR)

SELECT vote_id, phone_number, state FROM votes


Question: What are the maximum and minimum values of area codes?

Context: CREATE TABLE area_code_state (area_code INTEGER)

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


Question: What is last date created of votes from the state 'CA'?

Context: CREATE TABLE votes (created INTEGER, state VARCHAR)

SELECT MAX(created) FROM votes WHERE state = 'CA'


Question: What are the names of the contestants whose names are not 'Jessie Alloway'

Context: CREATE TABLE contestants (contestant_name VARCHAR)

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


Question: What are the distinct states and create time of all votes?

Context: CREATE TABLE votes (state VARCHAR, created VARCHAR)

SELECT DISTINCT state, created FROM votes


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

Context: CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)

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


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

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(*) LIMIT 1


Question: What are the number of votes from state 'NY' or 'CA'?

Context: CREATE TABLE votes (state VARCHAR)

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


Question: How many contestants did not get voted?

Context: CREATE TABLE contestants (contestant_number VARCHAR); CREATE TABLE votes (contestant_number VARCHAR)

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


Question: What is the area code in which the most voters voted?

Context: CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR); CREATE TABLE votes (state VARCHAR)

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


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

Context: CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE votes (created VARCHAR, state VARCHAR, phone_number VARCHAR, contestant_number VARCHAR)

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


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

Context: CREATE TABLE votes (contestant_number VARCHAR, state VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR)

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


Question: Return the names of the contestants whose names contain the substring 'Al' .

SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%al%"


Question: What are the names of all the countries that became independent after 1950?

Context: CREATE TABLE country (Name VARCHAR, IndepYear INTEGER)

SELECT Name FROM country WHERE IndepYear > 1950


Question: How many countries have a republic as their form of government?

Context: CREATE TABLE country (GovernmentForm VARCHAR)

SELECT COUNT(*) FROM country WHERE GovernmentForm = "Republic"


Question: What is the total surface area of the countries in the Caribbean region?

Context: CREATE TABLE country (SurfaceArea INTEGER, Region VARCHAR)

SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean"


Question: Which continent is Anguilla in?

Context: CREATE TABLE country (Continent VARCHAR, Name VARCHAR)

SELECT Continent FROM country WHERE Name = "Anguilla"


Question: Which region is the city Kabul located in?

Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE city (CountryCode VARCHAR, Name VARCHAR)

SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"


Question: Which language is the most popular in Aruba?

Context: CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)

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: What are the population and life expectancies in Brazil?

Context: CREATE TABLE country (Population VARCHAR, LifeExpectancy VARCHAR, Name VARCHAR)

SELECT Population, LifeExpectancy FROM country WHERE Name = "Brazil"


Question: What are the region and population of Angola?

Context: CREATE TABLE country (Population VARCHAR, Region VARCHAR, Name VARCHAR)

SELECT Population, Region FROM country WHERE Name = "Angola"


Question: What is the average expected life expectancy for countries in the region of Central Africa?

Context: CREATE TABLE country (LifeExpectancy INTEGER, Region VARCHAR)

SELECT AVG(LifeExpectancy) FROM country WHERE Region = "Central Africa"


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

Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, LifeExpectancy VARCHAR)

SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1


Question: What is the total population and maximum GNP in Asia?

Context: CREATE TABLE country (Population INTEGER, GNP INTEGER, Continent VARCHAR)

SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia"


Question: What is the average life expectancy in African countries that are republics?

Context: CREATE TABLE country (LifeExpectancy INTEGER, Continent VARCHAR, GovernmentForm VARCHAR)

SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic"


Question: What is the total surface area of the continents Asia and Europe?

Context: CREATE TABLE country (SurfaceArea INTEGER, Continent VARCHAR)

SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"


Question: How many people live in Gelderland district?

Context: CREATE TABLE city (Population INTEGER, District VARCHAR)

SELECT SUM(Population) FROM city WHERE District = "Gelderland"


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

Context: CREATE TABLE country (GNP INTEGER, population INTEGER, GovernmentForm VARCHAR)

SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = "US Territory"


Question: How many unique languages are spoken in the world?

Context: CREATE TABLE countrylanguage (LANGUAGE VARCHAR)

SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage


Question: How many type of governments are in Africa?

Context: CREATE TABLE country (GovernmentForm VARCHAR, Continent VARCHAR)

SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa"


Question: What is the total number of languages used in Aruba?

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


Question: How many official languages does Afghanistan have?

Context: CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR)

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 name of the country that speaks the largest number of languages?

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)

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


Question: Which continent has the most diverse languages?

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Continent VARCHAR, Code VARCHAR)

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: How many countries speak both English and Dutch?

Context: CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)

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: What are the names of nations speak both English and French?

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"


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

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)

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 is the number of distinct continents where Chinese is spoken?

Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)

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


Question: What are the regions that use English or Dutch?

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Region VARCHAR, Code VARCHAR)

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


Question: What are the countries where either English or Dutch is the official language ?

Context: CREATE TABLE countrylanguage (countrycode VARCHAR, language VARCHAR); CREATE TABLE country (name VARCHAR, code VARCHAR)

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: Which countries have either English or Dutch as an official language?

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


Question: Which language is the most popular on the Asian continent?

Context: CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)

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: Which languages are spoken by only one country in republic governments?

Context: CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Code VARCHAR, GovernmentForm VARCHAR)

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


Question: Find the city with the largest population that uses English.

Context: CREATE TABLE city (Name VARCHAR, Population VARCHAR, CountryCode VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)

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


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

Context: CREATE TABLE country (Name VARCHAR, Population VARCHAR, LifeExpectancy VARCHAR, Continent VARCHAR, SurfaceArea VARCHAR)

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


Question: What is average life expectancy in the countries where English is not the official language?

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (LifeExpectancy INTEGER, Name VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)

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: What is the total number of people living in the nations that do not use English?

Context: CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Population INTEGER, Name VARCHAR)

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 is the official language spoken in the country whose head of state is Beatrix?

Context: CREATE TABLE country (Code VARCHAR, HeadOfState VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)

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: What is the total number of unique official languages spoken in the countries that are founded before 1930?

Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)

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 countries that have greater surface area than any country in Europe?

Context: CREATE TABLE country (Name VARCHAR, SurfaceArea INTEGER, Continent VARCHAR)

SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe")


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

Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)

SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MAX(population) FROM country WHERE Continent = "Asia")


Question: Which African countries have a smaller population than that of any country in Asia?

SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia")


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

SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MAX(population) FROM country WHERE Continent = "Africa")


Question: What are the Asian countries which have a population larger than that of any country in Africa?

SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MIN(population) FROM country WHERE Continent = "Africa")


Question: What are the country codes for countries that do not speak English?

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR)

SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"


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

SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English"


Question: What are the codes of the countries that do not speak English and whose government forms are not Republic?

Context: CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TABLE country (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR)

SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"


Question: Which cities are in European countries where English is not the official language?

Context: CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE country (Code VARCHAR, Continent VARCHAR, Name VARCHAR)

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


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

Context: CREATE TABLE city (name VARCHAR, countrycode VARCHAR); CREATE TABLE countrylanguage (countrycode VARCHAR, isofficial VARCHAR, language VARCHAR); CREATE TABLE country (code VARCHAR, continent VARCHAR)

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


Question: Return the different names of cities that are in Asia and for which Chinese is the official language.

Context: CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR)

SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = "Asia"


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

Context: CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR, IndepYear VARCHAR, Population VARCHAR)

SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1


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

Context: CREATE TABLE country (Name VARCHAR, population VARCHAR, HeadOfState VARCHAR, SurfaceArea VARCHAR)

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


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

Context: CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)

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: Find the number of cities in each district whose population is greater than the average population of cities?

Context: CREATE TABLE city (District VARCHAR, Population INTEGER)

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


Question: Find the government form name and total population for each government form whose average life expectancy is longer than 72.

Context: CREATE TABLE country (GovernmentForm VARCHAR, Population INTEGER, LifeExpectancy INTEGER)

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


Question: Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?

Context: CREATE TABLE country (Continent VARCHAR, Population INTEGER, LifeExpectancy INTEGER)

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


Question: What are the names and areas of countries with the top 5 largest area?

Context: CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR)

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


Question: What are names of countries with the top 3 largest population?

Context: CREATE TABLE country (Name VARCHAR, Population VARCHAR)

SELECT Name FROM country ORDER BY Population DESC LIMIT 3


Question: What are the names of the nations with the 3 lowest populations?

SELECT Name FROM country ORDER BY Population LIMIT 3


Question: how many countries are in Asia?

Context: CREATE TABLE country (continent VARCHAR)

SELECT COUNT(*) FROM country WHERE continent = "Asia"


Question: What are the names of the countries that are in the continent of Europe and have a population of 80000?

Context: CREATE TABLE country (Name VARCHAR, continent VARCHAR, Population VARCHAR)

SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000"


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

Context: CREATE TABLE country (population INTEGER, surfacearea INTEGER, continent VARCHAR)

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


Question: What are the cities whose population is between 160000 and 900000?

Context: CREATE TABLE city (name VARCHAR, Population INTEGER)

SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000


Question: Return the names of cities that have a population between 160000 and 900000 .

Context: CREATE TABLE city (name VARCHAR, population INTEGER)

SELECT name FROM city WHERE population BETWEEN 160000 AND 900000


Question: Which language is spoken by the largest number of countries?

Context: CREATE TABLE countrylanguage (LANGUAGE VARCHAR)

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


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

Context: CREATE TABLE countrylanguage (LANGUAGE VARCHAR, CountryCode VARCHAR, Percentage INTEGER)

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


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

Context: CREATE TABLE countrylanguage (Percentage INTEGER, CountryCode VARCHAR, LANGUAGE VARCHAR)

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


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

Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, Percentage INTEGER, LANGUAGE VARCHAR)

SELECT CountryCode, MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = "Spanish" GROUP BY CountryCode


Question: How many conductors are there?

Context: CREATE TABLE conductor (Id VARCHAR)


Question: List the names of conductors in ascending order of age.

Context: CREATE TABLE conductor (Name VARCHAR, Age VARCHAR)


Question: What are the names of conductors whose nationalities are not "USA"?

Context: CREATE TABLE conductor (Name VARCHAR, Nationality VARCHAR)

SELECT Name FROM conductor WHERE Nationality <> 'USA'


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

Context: CREATE TABLE orchestra (Record_Company VARCHAR, Year_of_Founded VARCHAR)

SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC


Question: What is the average attendance of shows?

Context: CREATE TABLE SHOW (Attendance INTEGER)


Question: What are the maximum and minimum share of performances whose type is not "Live final".

Context: CREATE TABLE performance (SHARE INTEGER, TYPE VARCHAR)

SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> "Live final"


Question: How many different nationalities do conductors have?

Context: CREATE TABLE conductor (Nationality VARCHAR)

SELECT COUNT(DISTINCT Nationality) FROM conductor


Question: List names of conductors in descending order of years of work.

Context: CREATE TABLE conductor (Name VARCHAR, Year_of_Work VARCHAR)

SELECT Name FROM conductor ORDER BY Year_of_Work DESC


Question: List the name of the conductor with the most years of work.

SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1


Question: Show the names of conductors and the orchestras they have conducted.

Context: CREATE TABLE conductor (Name VARCHAR, Conductor_ID VARCHAR); CREATE TABLE orchestra (Orchestra VARCHAR, Conductor_ID VARCHAR)

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


Question: Show the names of conductors that have conducted more than one orchestras.

Context: CREATE TABLE orchestra (Conductor_ID VARCHAR); CREATE TABLE conductor (Name VARCHAR, Conductor_ID VARCHAR)

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: Show the name of the conductor that has conducted the most number of orchestras.

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: Please show the name of the conductor that has conducted orchestras founded after 2008.

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


Question: Please show the different record companies and the corresponding number of orchestras.

Context: CREATE TABLE orchestra (Record_Company VARCHAR)

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


Question: Please show the record formats of orchestras in ascending order of count.

Context: CREATE TABLE orchestra (Major_Record_Format VARCHAR)

SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*)


Question: List the record company shared by the most number of orchestras.

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


Question: List the names of orchestras that have no performance.

Context: CREATE TABLE orchestra (Orchestra VARCHAR, Orchestra_ID VARCHAR); CREATE TABLE performance (Orchestra VARCHAR, Orchestra_ID VARCHAR)

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


Question: Show the record companies shared by orchestras founded before 2003 and after 2003.

Context: CREATE TABLE orchestra (Record_Company VARCHAR, Year_of_Founded INTEGER)

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


Question: Find the number of orchestras whose record format is "CD" or "DVD".

SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = "CD" OR Major_Record_Format = "DVD"


Question: Show the years in which orchestras that have given more than one performance are founded.

Context: CREATE TABLE performance (Orchestra_ID VARCHAR); CREATE TABLE orchestra (Orchestra_ID VARCHAR)

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


Question: How many high schoolers are there?

Context: CREATE TABLE Highschooler (Id VARCHAR)


Question: Show the names and grades of each high schooler.

Context: CREATE TABLE Highschooler (name VARCHAR, grade VARCHAR)


Question: Show all the grades of the high schoolers.

Context: CREATE TABLE Highschooler (grade VARCHAR)


Question: What grade is Kyle in?

Context: CREATE TABLE Highschooler (grade VARCHAR, name VARCHAR)

SELECT grade FROM Highschooler WHERE name = "Kyle"


Question: Show the names of all high schoolers in grade 10.

SELECT name FROM Highschooler WHERE grade = 10


Question: Show the ID of the high schooler named Kyle.

Context: CREATE TABLE Highschooler (ID VARCHAR, name VARCHAR)

SELECT ID FROM Highschooler WHERE name = "Kyle"


Question: How many high schoolers are there in grade 9 or 10?

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


Question: Show the number of high schoolers for each grade.

SELECT grade, COUNT(*) FROM Highschooler GROUP BY grade


Question: Which grade has the most high schoolers?

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


Question: Show me all grades that have at least 4 students.

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


Question: Show the student IDs and numbers of friends corresponding to each.

Context: CREATE TABLE Friend (student_id VARCHAR)

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


Question: Show the names of high school students and their corresponding number of friends.

Context: CREATE TABLE Highschooler (name VARCHAR, id VARCHAR); CREATE TABLE Friend (student_id VARCHAR)

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


Question: What is the name of the high schooler who has the greatest number of friends?

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


Question: Show the names of high schoolers who have at least 3 friends.

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: Show the names of all of the high schooler Kyle's friends.

Context: CREATE TABLE Highschooler (name VARCHAR, id VARCHAR); CREATE TABLE Friend (student_id VARCHAR, friend_id VARCHAR); CREATE TABLE Highschooler (id VARCHAR, name VARCHAR)

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: How many friends does the high school student Kyle have?

Context: CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (id VARCHAR, name VARCHAR)

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


Question: Show ids of all students who do not have any friends.

Context: CREATE TABLE Highschooler (id VARCHAR, student_id VARCHAR); CREATE TABLE Friend (id VARCHAR, student_id VARCHAR)

SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend


Question: Show names of all high school students who do not have any friends.

Context: CREATE TABLE Highschooler (name VARCHAR, id VARCHAR); CREATE TABLE Highschooler (name VARCHAR); CREATE TABLE Friend (student_id VARCHAR)

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


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

Context: CREATE TABLE Likes (student_id VARCHAR, liked_id VARCHAR); CREATE TABLE Friend (student_id VARCHAR, liked_id VARCHAR)

SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes


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

Context: CREATE TABLE Highschooler (name VARCHAR, id VARCHAR); CREATE TABLE Likes (student_id VARCHAR, liked_id VARCHAR); CREATE TABLE Friend (student_id VARCHAR, liked_id VARCHAR)

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


Question: Count the number of likes for each student id.

Context: CREATE TABLE Likes (student_id VARCHAR)

SELECT student_id, COUNT(*) FROM Likes GROUP BY student_id


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

Context: CREATE TABLE Likes (student_id VARCHAR); CREATE TABLE Highschooler (name VARCHAR, id VARCHAR)

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


Question: What is the name of the high schooler who has the greatest number of likes?

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


Question: Show the names of students who have at least 2 likes.

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: Show the names of students who have a grade higher than 5 and have at least 2 friends.

Context: CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (name VARCHAR, id VARCHAR, grade INTEGER)

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: How many likes does Kyle have?

Context: CREATE TABLE Likes (student_id VARCHAR); CREATE TABLE Highschooler (id VARCHAR, name VARCHAR)

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


Question: Find the average grade of all students who have some friends.

Context: CREATE TABLE Highschooler (id VARCHAR); CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (grade INTEGER, id VARCHAR)

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


Question: Find the minimum grade of students who have no friends.

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 states have both owners and professionals living there?

Context: CREATE TABLE Owners (state VARCHAR); CREATE TABLE Professionals (state VARCHAR)

SELECT state FROM Owners INTERSECT SELECT state FROM Professionals


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

Context: CREATE TABLE Dogs (age INTEGER, dog_id VARCHAR); CREATE TABLE Treatments (age INTEGER, dog_id VARCHAR)

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


Question: Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.

Context: CREATE TABLE Treatments (professional_id VARCHAR); CREATE TABLE Professionals (professional_id VARCHAR, last_name VARCHAR, cell_number VARCHAR); CREATE TABLE Professionals (professional_id VARCHAR, last_name VARCHAR, cell_number VARCHAR, state VARCHAR)

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: Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .

Context: CREATE TABLE dogs (name VARCHAR, dog_id VARCHAR, cost_of_treatment INTEGER); CREATE TABLE treatments (name VARCHAR, dog_id VARCHAR, cost_of_treatment INTEGER)

SELECT name FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments GROUP BY dog_id HAVING SUM(cost_of_treatment) > 1000)


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

Context: CREATE TABLE Owners (first_name VARCHAR, name VARCHAR); CREATE TABLE Dogs (first_name VARCHAR, name VARCHAR); CREATE TABLE Professionals (first_name VARCHAR, name VARCHAR)

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


Question: Which professional did not operate any treatment on dogs? List the professional's id, role and email.

Context: CREATE TABLE Professionals (professional_id VARCHAR, role_code VARCHAR, email_address VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR)

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: Which owner owns the most dogs? List the owner id, first name and last name.

Context: CREATE TABLE Owners (first_name VARCHAR, last_name VARCHAR, owner_id VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR)

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: Which professionals have done at least two treatments? List the professional's id, role, and first name.

Context: CREATE TABLE Professionals (professional_id VARCHAR, role_code VARCHAR, first_name VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR)

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: What is the name of the breed with the most dogs?

Context: CREATE TABLE Dogs (breed_code VARCHAR); CREATE TABLE Breeds (breed_name VARCHAR, breed_code VARCHAR)

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 owner has paid for the most treatments on his or her dogs? List the owner id and last name.

Context: CREATE TABLE Owners (owner_id VARCHAR, last_name VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR, dog_id VARCHAR); CREATE TABLE Treatments (dog_id VARCHAR)

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


Question: What is the description of the treatment type that costs the least money in total?

Context: CREATE TABLE Treatments (treatment_type_code VARCHAR); CREATE TABLE Treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR)

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) LIMIT 1


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

Context: CREATE TABLE Treatments (dog_id VARCHAR, cost_of_treatment INTEGER); CREATE TABLE Owners (owner_id VARCHAR, zip_code VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR, dog_id VARCHAR)

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


Question: Which professionals have done at least two types of treatments? List the professional id and cell phone.

Context: CREATE TABLE Professionals (professional_id VARCHAR, cell_number VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR)

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: What are the first name and last name of the professionals who have done treatment with cost below average?

Context: CREATE TABLE Treatments (cost_of_treatment INTEGER); CREATE TABLE Professionals (first_name VARCHAR, last_name VARCHAR); CREATE TABLE Treatments (Id VARCHAR)

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


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

Context: CREATE TABLE Treatments (date_of_treatment VARCHAR, professional_id VARCHAR); CREATE TABLE Professionals (first_name VARCHAR, professional_id VARCHAR)

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


Question: List the cost of each treatment and the corresponding treatment type description.

Context: CREATE TABLE Treatments (cost_of_treatment VARCHAR, treatment_type_code VARCHAR); CREATE TABLE treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR)

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


Question: List each owner's first name, last name, and the size of his for her dog.

Context: CREATE TABLE Owners (first_name VARCHAR, last_name VARCHAR, owner_id VARCHAR); CREATE TABLE Dogs (size_code VARCHAR, owner_id VARCHAR)

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: List pairs of the owner's first name and the dogs's name.

Context: CREATE TABLE Dogs (name VARCHAR, owner_id VARCHAR); CREATE TABLE Owners (first_name VARCHAR, owner_id VARCHAR)

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


Question: List the names of the dogs of the rarest breed and the treatment dates of them.

Context: CREATE TABLE Dogs (name VARCHAR, dog_id VARCHAR, breed_code VARCHAR); CREATE TABLE Treatments (date_of_treatment VARCHAR, dog_id VARCHAR); CREATE TABLE Dogs (breed_code VARCHAR)

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


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

Context: CREATE TABLE Dogs (name VARCHAR, owner_id VARCHAR); CREATE TABLE Owners (first_name VARCHAR, owner_id VARCHAR, state VARCHAR)

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: What are the arriving date and the departing date of the dogs who have gone through a treatment?

Context: CREATE TABLE Dogs (date_arrived VARCHAR, date_departed VARCHAR, dog_id VARCHAR); CREATE TABLE Treatments (dog_id VARCHAR)

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


Question: List the last name of the owner owning the youngest dog.

Context: CREATE TABLE Owners (last_name VARCHAR, owner_id VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR, age INTEGER); CREATE TABLE Dogs (age INTEGER)

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: List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.

Context: CREATE TABLE Professionals (email_address VARCHAR, state VARCHAR)

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


Question: What are the arriving date and the departing date of all the dogs?

Context: CREATE TABLE Dogs (date_arrived VARCHAR, date_departed VARCHAR)

SELECT date_arrived, date_departed FROM Dogs


Question: How many dogs went through any treatments?

Context: CREATE TABLE Treatments (dog_id VARCHAR)

SELECT COUNT(DISTINCT dog_id) FROM Treatments


Question: How many professionals have performed any treatment to dogs?

Context: CREATE TABLE Treatments (professional_id VARCHAR)

SELECT COUNT(DISTINCT professional_id) FROM Treatments


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

Context: CREATE TABLE professionals (role_code VARCHAR, street VARCHAR, city VARCHAR, state VARCHAR)

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


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

Context: CREATE TABLE Owners (first_name VARCHAR, last_name VARCHAR, email_address VARCHAR, state VARCHAR)

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


Question: How many dogs have an age below the average?

Context: CREATE TABLE Dogs (age INTEGER)

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


Question: How much does the most recent treatment cost?

Context: CREATE TABLE Treatments (cost_of_treatment VARCHAR, date_of_treatment VARCHAR)

SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1


Question: How many dogs have not gone through any treatment?

Context: CREATE TABLE Dogs (dog_id VARCHAR); CREATE TABLE Treatments (dog_id VARCHAR)

SELECT COUNT(*) FROM Dogs WHERE NOT dog_id IN (SELECT dog_id FROM Treatments)


Question: Tell me the number of dogs that have not received any treatment .

Context: CREATE TABLE treatments (dog_id VARCHAR); CREATE TABLE dogs (dog_id VARCHAR)

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


Question: How many owners temporarily do not have any dogs?

Context: CREATE TABLE Dogs (owner_id VARCHAR); CREATE TABLE Owners (owner_id VARCHAR)

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


Question: How many professionals did not operate any treatment on dogs?

Context: CREATE TABLE Professionals (professional_id VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR)

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


Question: List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.

Context: CREATE TABLE Dogs (name VARCHAR, age VARCHAR, weight VARCHAR, abandoned_yn VARCHAR)

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


Question: What is the average age of all the dogs?

Context: CREATE TABLE Dogs (age INTEGER)


Question: What is the age of the oldest dog?

Context: CREATE TABLE Dogs (age INTEGER)


Question: How much does each charge type costs? List both charge type and amount.

Context: CREATE TABLE Charges (charge_type VARCHAR, charge_amount VARCHAR)

SELECT charge_type, charge_amount FROM Charges


Question: How much does the most expensive charge type costs?

Context: CREATE TABLE Charges (charge_amount INTEGER)


Question: List the email, cell phone and home phone of all the professionals.

Context: CREATE TABLE professionals (email_address VARCHAR, cell_number VARCHAR, home_phone VARCHAR)

SELECT email_address, cell_number, home_phone FROM professionals


Question: What are all the possible breed type and size type combinations?

Context: CREATE TABLE dogs (breed_code VARCHAR, size_code VARCHAR)

SELECT DISTINCT breed_code, size_code FROM dogs


Question: List the first name of all the professionals along with the description of the treatment they have done.

Context: CREATE TABLE Treatments (professional_id VARCHAR, treatment_type_code VARCHAR); CREATE TABLE Treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR); CREATE TABLE professionals (first_name VARCHAR, professional_id VARCHAR)

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: List the name of singers in ascending order of net worth.

Context: CREATE TABLE singer (Name VARCHAR, Net_Worth_Millions VARCHAR)

SELECT Name FROM singer ORDER BY Net_Worth_Millions


Question: What are the birth year and citizenship of singers?

Context: CREATE TABLE singer (Birth_Year VARCHAR, Citizenship VARCHAR)

SELECT Birth_Year, Citizenship FROM singer


Question: List the name of singers whose citizenship is not "France".

Context: CREATE TABLE singer (Name VARCHAR, Citizenship VARCHAR)

SELECT Name FROM singer WHERE Citizenship <> "France"


Question: Show the name of singers whose birth year is either 1948 or 1949?

Context: CREATE TABLE singer (Name VARCHAR, Birth_Year VARCHAR)

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


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

SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1


Question: Show different citizenship of singers and the number of singers of each citizenship.

Context: CREATE TABLE singer (Citizenship VARCHAR)

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


Question: Please show the most common citizenship of singers.

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


Question: What is the most common singer citizenship ?

Context: CREATE TABLE singer (citizenship VARCHAR)

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


Question: Show different citizenships and the maximum net worth of singers of each citizenship.

Context: CREATE TABLE singer (Citizenship VARCHAR, Net_Worth_Millions INTEGER)

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


Question: Show titles of songs and names of singers.

Context: CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR); CREATE TABLE song (Title VARCHAR, Singer_ID VARCHAR)

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


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

Context: CREATE TABLE song (Singer_ID VARCHAR, Sales INTEGER); CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR)

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


Question: Show the names of singers that have more than one song.

Context: CREATE TABLE song (Singer_ID VARCHAR); CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR)

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: Show the names of singers and the total sales of their songs.

Context: CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR); CREATE TABLE song (Sales INTEGER, Singer_ID VARCHAR)

SELECT T1.Name, SUM(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name


Question: List the name of singers that do not have any song.

Context: CREATE TABLE song (Name VARCHAR, Singer_ID VARCHAR); CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR)

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


Question: Show the citizenship shared by singers with birth year before 1945 and after 1955.

Context: CREATE TABLE singer (Citizenship VARCHAR, Birth_Year INTEGER)

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


Question: How many available features are there in total?

Context: CREATE TABLE Other_Available_Features (Id VARCHAR)

SELECT COUNT(*) FROM Other_Available_Features


Question: What is the feature type name of feature AirCon?

Context: CREATE TABLE Other_Available_Features (feature_type_code VARCHAR, feature_name VARCHAR); CREATE TABLE Ref_Feature_Types (feature_type_name VARCHAR, feature_type_code VARCHAR)

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: Show the property type descriptions of properties belonging to that code.

Context: CREATE TABLE Properties (property_type_code VARCHAR); CREATE TABLE Ref_Property_Types (property_type_description VARCHAR, property_type_code VARCHAR)

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 names of properties that are either houses or apartments with more than 1 room?

Context: CREATE TABLE Properties (property_name VARCHAR, property_type_code VARCHAR, room_count VARCHAR)

SELECT property_name FROM Properties WHERE property_type_code = "House" UNION SELECT property_name FROM Properties WHERE property_type_code = "Apartment" AND room_count > 1


Question: What is terrence ross' nationality

Context: CREATE TABLE table_10015132_16 (nationality VARCHAR, player VARCHAR)

SELECT nationality FROM table_10015132_16 WHERE player = "Terrence Ross"


Question: What clu was in toronto 1995-96

Context: CREATE TABLE table_10015132_16 (school_club_team VARCHAR, years_in_toronto VARCHAR)

SELECT school_club_team FROM table_10015132_16 WHERE years_in_toronto = "1995-96"


Question: which club was in toronto 2003-06

SELECT school_club_team FROM table_10015132_16 WHERE years_in_toronto = "2003-06"


Question: how many schools or teams had jalen rose

Context: CREATE TABLE table_10015132_16 (school_club_team VARCHAR, player VARCHAR)

SELECT COUNT(school_club_team) FROM table_10015132_16 WHERE player = "Jalen Rose"


Question: Where was Assen held?

Context: CREATE TABLE table_10083598_1 (round VARCHAR, circuit VARCHAR)

SELECT round FROM table_10083598_1 WHERE circuit = "Assen"


Question: What was the number of race that Kevin Curtain won?

Context: CREATE TABLE table_10083598_1 (no VARCHAR, pole_position VARCHAR)

SELECT COUNT(no) FROM table_10083598_1 WHERE pole_position = "Kevin Curtain"


Question: What was the date of the race in Misano?

Context: CREATE TABLE table_10083598_1 (date VARCHAR, circuit VARCHAR)

SELECT date FROM table_10083598_1 WHERE circuit = "Misano"


Question: How many different positions did Sherbrooke Faucons (qmjhl) provide in the draft?

Context: CREATE TABLE table_1013129_2 (position VARCHAR, college_junior_club_team VARCHAR)

SELECT COUNT(position) FROM table_1013129_2 WHERE college_junior_club_team = "Sherbrooke Faucons (QMJHL)"


Question: What are the nationalities of the player picked from Thunder Bay Flyers (ushl)

Context: CREATE TABLE table_1013129_2 (nationality VARCHAR, college_junior_club_team VARCHAR)

SELECT nationality FROM table_1013129_2 WHERE college_junior_club_team = "Thunder Bay Flyers (USHL)"


Question: How many different college/junior/club teams provided a player to the Washington Capitals NHL Team?

Context: CREATE TABLE table_1013129_2 (college_junior_club_team VARCHAR, nhl_team VARCHAR)

SELECT COUNT(college_junior_club_team) FROM table_1013129_2 WHERE nhl_team = "Washington Capitals"


Question: How many different nationalities do the players of New Jersey Devils come from?

Context: CREATE TABLE table_1013129_3 (nationality VARCHAR, nhl_team VARCHAR)

SELECT COUNT(nationality) FROM table_1013129_3 WHERE nhl_team = "New Jersey Devils"


Question: What's Dorain Anneck's pick number?

Context: CREATE TABLE table_1013129_3 (pick VARCHAR, player VARCHAR)

SELECT pick FROM table_1013129_3 WHERE player = "Dorain Anneck"


Question: What is the nationality of the player from Vancouver Canucks?

SELECT nationality FROM table_1013129_3 WHERE nhl_team = "Vancouver Canucks"


Question: What's the pick number of the player from Springfield Olympics (Nejhl)?

Context: CREATE TABLE table_1013129_3 (pick VARCHAR, college_junior_club_team VARCHAR)

SELECT pick FROM table_1013129_3 WHERE college_junior_club_team = "Springfield Olympics (NEJHL)"


Question: When were the ships launched that were laid down on september 1, 1964?

Context: CREATE TABLE table_1014206_2 (launched VARCHAR, laid_down VARCHAR)

SELECT launched FROM table_1014206_2 WHERE laid_down = "September 1, 1964"


Question: List the # for ships commissioned on december 18, 1965.

Context: CREATE TABLE table_1014206_2 (_number VARCHAR, commissioned VARCHAR)

SELECT _number FROM table_1014206_2 WHERE commissioned = "December 18, 1965"


Question: List the # for ships commissioned on september 30, 1967.

SELECT _number FROM table_1014206_2 WHERE commissioned = "September 30, 1967"


Question: When were ships laid down that were commissioned on october 29, 1965?

Context: CREATE TABLE table_1014206_2 (laid_down VARCHAR, commissioned VARCHAR)

SELECT laid_down FROM table_1014206_2 WHERE commissioned = "October 29, 1965"


Question: What could a spanish coronel be addressed as in the commonwealth military?

Context: CREATE TABLE table_1015521_2 (commonwealth_equivalent VARCHAR, rank_in_spanish VARCHAR)

SELECT commonwealth_equivalent FROM table_1015521_2 WHERE rank_in_spanish = "Coronel"


Question: Give me a list of all spanish officer titles that could receive recognition as group captain in english

Context: CREATE TABLE table_1015521_2 (rank_in_english VARCHAR, commonwealth_equivalent VARCHAR)

SELECT rank_in_english FROM table_1015521_2 WHERE commonwealth_equivalent = "Group Captain"


Question: If you are a pilot officer in the commonwealth then what will you called as in the US air force?

Context: CREATE TABLE table_1015521_2 (us_air_force_equivalent VARCHAR, commonwealth_equivalent VARCHAR)

SELECT us_air_force_equivalent FROM table_1015521_2 WHERE commonwealth_equivalent = "Pilot Officer"


Question: If you're a major general in the US air force then what ranking will you receive in the commonwealth's air force?

Context: CREATE TABLE table_1015521_2 (commonwealth_equivalent VARCHAR, us_air_force_equivalent VARCHAR)

SELECT commonwealth_equivalent FROM table_1015521_2 WHERE us_air_force_equivalent = "Major General"


Question: If you get a ranking as major in the  english military then what would the spanish military address you as?

Context: CREATE TABLE table_1015521_2 (rank_in_spanish VARCHAR, rank_in_english VARCHAR)

SELECT rank_in_spanish FROM table_1015521_2 WHERE rank_in_english = "Major"


Question: Which province is grey and bell electorate in

Context: CREATE TABLE table_1024710_2 (province VARCHAR, electorate VARCHAR)

SELECT province FROM table_1024710_2 WHERE electorate = "Grey and Bell"


Question: Which province is bay of islands in

SELECT province FROM table_1024710_2 WHERE electorate = "Bay of Islands"


Question: what is the total number of total w–l where doubles w–l is 11–11

Context: CREATE TABLE table_10294071_1 (total_w_l VARCHAR, doubles_w_l VARCHAR)

SELECT COUNT(total_w_l) FROM table_10294071_1 WHERE doubles_w_l = "11–11"


Question: what is the total number of singles w–l where doubles w–l is 11–14

Context: CREATE TABLE table_10294071_1 (singles_w_l VARCHAR, doubles_w_l VARCHAR)

SELECT COUNT(singles_w_l) FROM table_10294071_1 WHERE doubles_w_l = "11–14"


Question: what's the total w–l where player is boro jovanović category:articles with hcards

Context: CREATE TABLE table_10294071_1 (total_w_l VARCHAR, player VARCHAR)

SELECT total_w_l FROM table_10294071_1 WHERE player = "Boro Jovanović Category:Articles with hCards"


Question: what is the maximum ties played where player is josip palada category:articles with hcards

Context: CREATE TABLE table_10294071_1 (ties_played INTEGER, player VARCHAR)

SELECT MAX(ties_played) FROM table_10294071_1 WHERE player = "Josip Palada Category:Articles with hCards"


Question: what is the total number of ties played where total w–l is 38–24

Context: CREATE TABLE table_10294071_1 (ties_played VARCHAR, total_w_l VARCHAR)

SELECT COUNT(ties_played) FROM table_10294071_1 WHERE total_w_l = "38–24"


Question: What is the Frequency at the Market/Rank of Burlington - Plattsburgh , Vermont - New York /143?

Context: CREATE TABLE table_10333757_1 (frequency VARCHAR, market_rank VARCHAR)

SELECT COUNT(frequency) FROM table_10333757_1 WHERE market_rank = "Burlington - Plattsburgh , Vermont - New York /143"


Question: What is the Branding for Group Owner Qantam of Cape Cod, LLC?

Context: CREATE TABLE table_10333757_1 (branding VARCHAR, group_owner VARCHAR)

SELECT branding FROM table_10333757_1 WHERE group_owner = "Qantam of Cape Cod, LLC"


Question: What Branding does WRKO calls use?

Context: CREATE TABLE table_10333757_1 (branding VARCHAR, calls VARCHAR)

SELECT branding FROM table_10333757_1 WHERE calls = "WRKO"


Question: What is the Format for Branding of 1290 wkbk w281au 104.1?

Context: CREATE TABLE table_10333757_1 (format VARCHAR, branding VARCHAR)

SELECT format FROM table_10333757_1 WHERE branding = "1290 WKBK W281AU 104.1"


Question: Which Market/Rank is associated with WCRN calls?

Context: CREATE TABLE table_10333757_1 (market_rank VARCHAR, calls VARCHAR)

SELECT market_rank FROM table_10333757_1 WHERE calls = "WCRN"


Question: Which Frequency is used for WEGP calls?

Context: CREATE TABLE table_10333757_1 (frequency VARCHAR, calls VARCHAR)

SELECT frequency FROM table_10333757_1 WHERE calls = "WEGP"


Question: What is the regulated retail price for the tariff code ff0 prs?

Context: CREATE TABLE table_10408617_5 (bts_retail_price__regulated_ VARCHAR, tariff_code VARCHAR)

SELECT bts_retail_price__regulated_ FROM table_10408617_5 WHERE tariff_code = "ff0 PRS"


Question: What is the premium associated with tariff code g9?

Context: CREATE TABLE table_10408617_5 (approx_premium VARCHAR, tariff_code VARCHAR)

SELECT approx_premium FROM table_10408617_5 WHERE tariff_code = "g9"


Question: How many tariff codes have a bts retail price of 2p/min or inclusive?

Context: CREATE TABLE table_10408617_5 (tariff_code VARCHAR, bts_retail_price__regulated_ VARCHAR)

SELECT COUNT(tariff_code) FROM table_10408617_5 WHERE bts_retail_price__regulated_ = "2p/min or inclusive"


Question: How many tariff codes have a bts retail price of 2.553p/min?

SELECT COUNT(tariff_code) FROM table_10408617_5 WHERE bts_retail_price__regulated_ = "2.553p/min"


Question: What prefixes are priced at pence per minute, fixed at all times with a premium of 3p/min?

Context: CREATE TABLE table_10408617_5 (prefixes VARCHAR, scheme VARCHAR, approx_premium VARCHAR)

SELECT prefixes FROM table_10408617_5 WHERE scheme = "Pence per minute, fixed at all times" AND approx_premium = "3p/min"


Question: What is the bts retail price (regulated) for tariff code g10?

SELECT bts_retail_price__regulated_ FROM table_10408617_5 WHERE tariff_code = "g10"


Question: What is the smallest possible radius?

Context: CREATE TABLE table_10432351_1 (radius__r___ INTEGER)

SELECT MIN(radius__r___) FROM table_10432351_1


Question: What are all the spectral types for star mismis24-# is 1sw?

Context: CREATE TABLE table_10432351_1 (spectral_type VARCHAR, star__pismis24__number_ VARCHAR)

SELECT spectral_type FROM table_10432351_1 WHERE star__pismis24__number_ = "1SW"


Question: If a radius is 10, what  is the lowest possible mass?

Context: CREATE TABLE table_10432351_1 (mass__m___ INTEGER, radius__r___ VARCHAR)

SELECT MIN(mass__m___) FROM table_10432351_1 WHERE radius__r___ = 10


Question: What percentage of seats were filled in 2006?

Context: CREATE TABLE table_105344_2 (seat_factor VARCHAR, year VARCHAR)

SELECT seat_factor FROM table_105344_2 WHERE year = 2006


Question: How many hours were flown in each of the years where more than 64379058.0 kilometers were flown?

Context: CREATE TABLE table_105344_2 (flying_hours VARCHAR, aircraft_kilometers INTEGER)

SELECT flying_hours FROM table_105344_2 WHERE aircraft_kilometers > 64379058.0


Question: Of the years that had exactly 17096 departures, what is the greatest number of aircraft kilometers flown?

Context: CREATE TABLE table_105344_2 (aircraft_kilometers INTEGER, departures VARCHAR)

SELECT MAX(aircraft_kilometers) FROM table_105344_2 WHERE departures = 17096


Question: Which winning team beat the New York Yankees?

Context: CREATE TABLE table_10548224_1 (winning_team VARCHAR, losing_team VARCHAR)

SELECT winning_team FROM table_10548224_1 WHERE losing_team = "New York Yankees"


Question: What was the final score for the game that was contested on February 1, 2009?

Context: CREATE TABLE table_10548224_1 (final_score VARCHAR, date_contested VARCHAR)

SELECT final_score FROM table_10548224_1 WHERE date_contested = "February 1, 2009"


Question: What sport had a final score of 3-2?

Context: CREATE TABLE table_10548224_1 (sport VARCHAR, final_score VARCHAR)

SELECT sport FROM table_10548224_1 WHERE final_score = "3-2"


Question: Who was the winning team of the game that was contested on February 1, 2009?

Context: CREATE TABLE table_10548224_1 (winning_team VARCHAR, date_contested VARCHAR)

SELECT winning_team FROM table_10548224_1 WHERE date_contested = "February 1, 2009"


Question: Who was the losing team of the game that was contested on February 1, 2004?

Context: CREATE TABLE table_10548224_1 (losing_team VARCHAR, date_contested VARCHAR)

SELECT losing_team FROM table_10548224_1 WHERE date_contested = "February 1, 2004"


Question: what's the minimum total with crop (kilotonnes) being s lupin

Context: CREATE TABLE table_1057262_2 (total INTEGER, crop__kilotonnes_ VARCHAR)

SELECT MIN(total) FROM table_1057262_2 WHERE crop__kilotonnes_ = "s Lupin"


Question: what's the new south wales with crop (kilotonnes) being canola

Context: CREATE TABLE table_1057262_2 (new_south_wales VARCHAR, crop__kilotonnes_ VARCHAR)

SELECT new_south_wales FROM table_1057262_2 WHERE crop__kilotonnes_ = "Canola"


Question: what's the total number of south australia with victoria value of 2173

Context: CREATE TABLE table_1057262_2 (south_australia VARCHAR, victoria VARCHAR)

SELECT COUNT(south_australia) FROM table_1057262_2 WHERE victoria = 2173


Question: what's the minimum tasmania value

Context: CREATE TABLE table_1057262_2 (tasmania INTEGER)

SELECT MIN(tasmania) FROM table_1057262_2


Question: what's the total number of tasmania with new south wales crop of 190 kilotonnes

Context: CREATE TABLE table_1057262_2 (tasmania VARCHAR, new_south_wales VARCHAR)

SELECT COUNT(tasmania) FROM table_1057262_2 WHERE new_south_wales = 190


Question: How many significant relationships list Will as a virtue?

Context: CREATE TABLE table_1058787_1 (significant_relationship VARCHAR, virtues VARCHAR)

SELECT COUNT(significant_relationship) FROM table_1058787_1 WHERE virtues = "Will"


Question: Which examples ask the existential question "Can I Love?"

Context: CREATE TABLE table_1058787_1 (examples VARCHAR, existential_question_ VARCHAR, _not_in_citation_given_ VARCHAR)

SELECT examples FROM table_1058787_1 WHERE existential_question_[_not_in_citation_given_] = "Can I Love?"


Question: How many countries got 796.7 points?

Context: CREATE TABLE table_1059743_2 (rank VARCHAR, points VARCHAR)

SELECT COUNT(rank) FROM table_1059743_2 WHERE points = "796.7"


Question: In what group stage were 177.2 points awarded?

Context: CREATE TABLE table_1059743_2 (group_stage VARCHAR, points VARCHAR)

SELECT COUNT(group_stage) FROM table_1059743_2 WHERE points = "177.2"


Question: What is the lowest group to earn 886.6 points?

Context: CREATE TABLE table_1059743_2 (group_stage INTEGER, points VARCHAR)

SELECT MIN(group_stage) FROM table_1059743_2 WHERE points = "886.6"


Question: How many countries earned 177.2 points?

Context: CREATE TABLE table_1059743_2 (member_association VARCHAR, points VARCHAR)

SELECT COUNT(member_association) FROM table_1059743_2 WHERE points = "177.2"


Question: What country had the total 18,900 (r)?

Context: CREATE TABLE table_10586064_2 (county VARCHAR, total VARCHAR)

SELECT county FROM table_10586064_2 WHERE total = "18,900 (R)"


Question: What is the county of precints 515?

Context: CREATE TABLE table_10586064_2 (county VARCHAR, precincts VARCHAR)

SELECT county FROM table_10586064_2 WHERE precincts = 515


Question: Which city has a capacity of 41903?

Context: CREATE TABLE table_10601843_2 (city VARCHAR, capacity VARCHAR)

SELECT city FROM table_10601843_2 WHERE capacity = 41903


Question: What is the maximum capacity of the Otkrytie Arena stadium?

Context: CREATE TABLE table_10601843_2 (capacity INTEGER, stadium VARCHAR)

SELECT MAX(capacity) FROM table_10601843_2 WHERE stadium = "Otkrytie Arena"


Question: When did the stadium where Bursaspor is the tenant open?

Context: CREATE TABLE table_10601843_2 (opening INTEGER, tenant VARCHAR)

SELECT MIN(opening) FROM table_10601843_2 WHERE tenant = "Bursaspor"


Question: How many tenants are there in the city of Samsun?

Context: CREATE TABLE table_10601843_2 (tenant VARCHAR, city VARCHAR)

SELECT COUNT(tenant) FROM table_10601843_2 WHERE city = "Samsun"


Question: What is the percentage of the Shivalik Zone where the percentage of the Mid-Hill Zone is 10%?

Context: CREATE TABLE table_10638523_1 (shivalik_zone VARCHAR, mid_hill_zone VARCHAR)

SELECT shivalik_zone FROM table_10638523_1 WHERE mid_hill_zone = "10%"


Question: For mid-hill zone  what is the altitude?

Context: CREATE TABLE table_10638523_1 (mid_hill_zone VARCHAR, particulars_and_characteristics VARCHAR)

SELECT mid_hill_zone FROM table_10638523_1 WHERE particulars_and_characteristics = "Altitude"


Question: What are the climatic conditions for the trance- n himalaya zone?

Context: CREATE TABLE table_10638523_1 (trance__n_himalaya_zone VARCHAR, particulars_and_characteristics VARCHAR)

SELECT trance__n_himalaya_zone FROM table_10638523_1 WHERE particulars_and_characteristics = "Climatic conditions"


Question: What is the percentage of the  trance- n himalaya zone that corresponds with the high hill zone is 25%?

Context: CREATE TABLE table_10638523_1 (trance__n_himalaya_zone VARCHAR, high_hill_zone VARCHAR)

SELECT trance__n_himalaya_zone FROM table_10638523_1 WHERE high_hill_zone = "25%"


Question: What is the state of Ted Stevens?

Context: CREATE TABLE table_10644188_3 (state_represented VARCHAR, name VARCHAR)

SELECT state_represented FROM table_10644188_3 WHERE name = "Ted Stevens"


Question: What's the standard of the country who won its first title in 1992?

Context: CREATE TABLE table_10682862_68 (standard INTEGER, first_title VARCHAR)

SELECT MAX(standard) FROM table_10682862_68 WHERE first_title = 1992


Question: What's the smallest number of players?

Context: CREATE TABLE table_10682862_68 (players INTEGER)

SELECT MIN(players) FROM table_10682862_68


Question: In what year was the last last title received, by any of the countries?

Context: CREATE TABLE table_10682862_68 (last_title INTEGER)

SELECT MAX(last_title) FROM table_10682862_68


Question: What religious groups made up 0.72% of the Indian population in 2001?

Context: CREATE TABLE table_10710364_1 (religious_group VARCHAR, population__percentage_2001 VARCHAR)

SELECT religious_group FROM table_10710364_1 WHERE population__percentage_2001 = "0.72%"


Question: What is the original air date for episode 15 of season 6?

Context: CREATE TABLE table_10718868_2 (original_air_date VARCHAR, no_in_season VARCHAR)

SELECT original_air_date FROM table_10718868_2 WHERE no_in_season = 15


Question: Which podiums did the Williams team have with a margin of defeat of 2?

Context: CREATE TABLE table_10753917_1 (podiums VARCHAR, team VARCHAR, margin_of_defeat VARCHAR)

SELECT podiums FROM table_10753917_1 WHERE team = "Williams" AND margin_of_defeat = "2"


Question: How many drivers on the williams team had a margin of defeat of 2?

Context: CREATE TABLE table_10753917_1 (driver VARCHAR, team VARCHAR, margin_of_defeat VARCHAR)

SELECT COUNT(driver) FROM table_10753917_1 WHERE team = "Williams" AND margin_of_defeat = "2"


Question: How many seasons was clay regazzoni the driver?

Context: CREATE TABLE table_10753917_1 (season VARCHAR, driver VARCHAR)

SELECT COUNT(season) FROM table_10753917_1 WHERE driver = "Clay Regazzoni"


Question: Which margin of defeats had points of 30?

Context: CREATE TABLE table_10753917_1 (margin_of_defeat VARCHAR, points VARCHAR)

SELECT margin_of_defeat FROM table_10753917_1 WHERE points = "30"


Question: Which podiums did the alfa romeo team have?

Context: CREATE TABLE table_10753917_1 (podiums VARCHAR, team VARCHAR)

SELECT podiums FROM table_10753917_1 WHERE team = "Alfa Romeo"


Question: What was the percent of slovenes 1951 for bach?

Context: CREATE TABLE table_10797636_1 (percent_of_slovenes_1951 VARCHAR, village__german_ VARCHAR)

SELECT percent_of_slovenes_1951 FROM table_10797636_1 WHERE village__german_ = "Bach"


Question: What college's team is the Saskatchewan Roughriders?

Context: CREATE TABLE table_10812403_4 (college VARCHAR, cfl_team VARCHAR)

SELECT college FROM table_10812403_4 WHERE cfl_team = "Saskatchewan Roughriders"


Question: What position did Calvin Mccarty play?

Context: CREATE TABLE table_10812403_4 (position VARCHAR, player VARCHAR)

SELECT position FROM table_10812403_4 WHERE player = "Calvin McCarty"


Question: How many people were pick #30?

Context: CREATE TABLE table_10812403_4 (position VARCHAR, pick__number VARCHAR)

SELECT COUNT(position) FROM table_10812403_4 WHERE pick__number = 30


Question: What college did Calvin McCarty play at?

Context: CREATE TABLE table_10812403_4 (college VARCHAR, player VARCHAR)

SELECT college FROM table_10812403_4 WHERE player = "Calvin McCarty"


Question: What college had a LB in the draft?

Context: CREATE TABLE table_10812403_4 (college VARCHAR, position VARCHAR)

SELECT college FROM table_10812403_4 WHERE position = "LB"


Question: Who got high assists for the game played on February 9?

Context: CREATE TABLE table_10812293_6 (high_assists VARCHAR, date VARCHAR)

SELECT high_assists FROM table_10812293_6 WHERE date = "February 9"


Question: Which lava domes erupted or had a growth episode during the Holocene period?

Context: CREATE TABLE table_1081235_1 (name_of_lava_dome VARCHAR, last_eruption_or_growth_episode VARCHAR)

SELECT name_of_lava_dome FROM table_1081235_1 WHERE last_eruption_or_growth_episode = "Holocene"


Question: What is the composition at Valles lava dome?

Context: CREATE TABLE table_1081235_1 (composition VARCHAR, name_of_lava_dome VARCHAR)

SELECT composition FROM table_1081235_1 WHERE name_of_lava_dome = "Valles lava dome"


Question: How many countries are the Tata Sabaya Lava domes located in?

Context: CREATE TABLE table_1081235_1 (country VARCHAR, name_of_lava_dome VARCHAR)

SELECT COUNT(country) FROM table_1081235_1 WHERE name_of_lava_dome = "Tata Sabaya lava domes"


Question: What countries have had eruptions of growth episodes in 1986?

Context: CREATE TABLE table_1081235_1 (country VARCHAR, last_eruption_or_growth_episode VARCHAR)

SELECT country FROM table_1081235_1 WHERE last_eruption_or_growth_episode = "1986"


Question: Who is the lyricist for the song with a length of 3:05?

Context: CREATE TABLE table_10848177_1 (lyricist VARCHAR, length VARCHAR)

SELECT lyricist FROM table_10848177_1 WHERE length = "3:05"


Question: What song has a length of 3:05?

Context: CREATE TABLE table_10848177_1 (song VARCHAR, length VARCHAR)

SELECT song FROM table_10848177_1 WHERE length = "3:05"


Question: Which lyricist has a song with a length of 6:14?

SELECT lyricist FROM table_10848177_1 WHERE length = "6:14"


Question: What is the highest track number?

Context: CREATE TABLE table_10848177_1 (track__number INTEGER)

SELECT MAX(track__number) FROM table_10848177_1


Question: Which song has picturization by only vijay?

Context: CREATE TABLE table_10848177_1 (song VARCHAR, picturization VARCHAR)

SELECT song FROM table_10848177_1 WHERE picturization = "Vijay"


Question: For which singers was Alangudi Somu the lyricist?

Context: CREATE TABLE table_10848177_1 (singers VARCHAR, lyricist VARCHAR)

SELECT singers FROM table_10848177_1 WHERE lyricist = "Alangudi Somu"


Question: What publishers were involved with product number SCUS-97265?

Context: CREATE TABLE table_10875694_11 (publisher VARCHAR, product_no VARCHAR)

SELECT publisher FROM table_10875694_11 WHERE product_no = "SCUS-97265"


Question: What is the total number of James Bond 007: Everything or Nothing for each system?

Context: CREATE TABLE table_10875694_11 (system VARCHAR, title VARCHAR)

SELECT COUNT(system) FROM table_10875694_11 WHERE title = "James Bond 007: Everything or Nothing"


Question: How many products have the title "Jak 3"?

Context: CREATE TABLE table_10875694_11 (product_no VARCHAR, title VARCHAR)

SELECT COUNT(product_no) FROM table_10875694_11 WHERE title = "Jak 3"