text
stringlengths 146
1.06k
| source
dict |
---|---|
### QUESTION
List all player names who have an overall rating higher than the average.
### CONTEXT
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating INTEGER)
### ANSWER
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > (SELECT AVG(overall_rating) FROM Player_Attributes) | {
"answer": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > (SELECT AVG(overall_rating) FROM Player_Attributes)",
"context": "CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating INTEGER)",
"question": "List all player names who have an overall rating higher than the average."
} |
### QUESTION
What are the names of players who have the best dribbling?
### CONTEXT
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, dribbling VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER)
### ANSWER
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes) | {
"answer": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes)",
"context": "CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, dribbling VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER)",
"question": "What are the names of players who have the best dribbling?"
} |
### QUESTION
List the names of all players who have a crossing score higher than 90 and prefer their right foot.
### CONTEXT
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, crossing VARCHAR, preferred_foot VARCHAR)
### ANSWER
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = "right" | {
"answer": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = \"right\"",
"context": "CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, crossing VARCHAR, preferred_foot VARCHAR)",
"question": "List the names of all players who have a crossing score higher than 90 and prefer their right foot."
} |
### QUESTION
List the names of all left-footed players who have overall rating between 85 and 90.
### CONTEXT
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating VARCHAR, preferred_foot VARCHAR)
### ANSWER
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = "left" AND T2.overall_rating >= 85 AND T2.overall_rating <= 90 | {
"answer": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = \"left\" AND T2.overall_rating >= 85 AND T2.overall_rating <= 90",
"context": "CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating VARCHAR, preferred_foot VARCHAR)",
"question": "List the names of all left-footed players who have overall rating between 85 and 90."
} |
### QUESTION
List all of the player ids with a height of at least 180cm and an overall rating higher than 85.
### CONTEXT
CREATE TABLE Player_Attributes (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER); CREATE TABLE Player (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER)
### ANSWER
SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85 | {
"answer": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85",
"context": "CREATE TABLE Player_Attributes (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER); CREATE TABLE Player (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER)",
"question": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85."
} |
### QUESTION
List all of the ids for left-footed players with a height between 180cm and 190cm.
### CONTEXT
CREATE TABLE Player_Attributes (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR); CREATE TABLE Player (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR)
### ANSWER
SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = "left" | {
"answer": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = \"left\"",
"context": "CREATE TABLE Player_Attributes (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR); CREATE TABLE Player (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR)",
"question": "List all of the ids for left-footed players with a height between 180cm and 190cm."
} |
### QUESTION
Who are the top 3 players in terms of overall rating?
### CONTEXT
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR)
### ANSWER
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3 | {
"answer": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3",
"context": "CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR)",
"question": "Who are the top 3 players in terms of overall rating?"
} |
### QUESTION
List the names and birthdays of the top five players in terms of potential.
### CONTEXT
CREATE TABLE Player_Attributes (player_api_id VARCHAR); CREATE TABLE Player (player_name VARCHAR, birthday VARCHAR, player_api_id VARCHAR)
### ANSWER
SELECT DISTINCT T1.player_name, T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5 | {
"answer": "SELECT DISTINCT T1.player_name, T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5",
"context": "CREATE TABLE Player_Attributes (player_api_id VARCHAR); CREATE TABLE Player (player_name VARCHAR, birthday VARCHAR, player_api_id VARCHAR)",
"question": "List the names and birthdays of the top five players in terms of potential."
} |
### QUESTION
What is the arena capacity of the arena in the town whose head coach is Yuriy Korotkevich?
### CONTEXT
CREATE TABLE table_19526911_1 (arena__capacity_ VARCHAR, head_coach VARCHAR)
### ANSWER
SELECT COUNT(arena__capacity_) FROM table_19526911_1 WHERE head_coach = "Yuriy Korotkevich" | {
"answer": "SELECT COUNT(arena__capacity_) FROM table_19526911_1 WHERE head_coach = \"Yuriy Korotkevich\"",
"context": "CREATE TABLE table_19526911_1 (arena__capacity_ VARCHAR, head_coach VARCHAR)",
"question": "What is the arena capacity of the arena in the town whose head coach is Yuriy Korotkevich?"
} |
### QUESTION
Show the attendances of the performances at location "TD Garden" or "Bell Centre"
### CONTEXT
CREATE TABLE performance (Attendance VARCHAR, LOCATION VARCHAR)
### ANSWER
SELECT Attendance FROM performance WHERE LOCATION = "TD Garden" OR LOCATION = "Bell Centre" | {
"answer": "SELECT Attendance FROM performance WHERE LOCATION = \"TD Garden\" OR LOCATION = \"Bell Centre\"",
"context": "CREATE TABLE performance (Attendance VARCHAR, LOCATION VARCHAR)",
"question": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\""
} |
### QUESTION
What is the winning span in the country of England with the name of paul casey?
### CONTEXT
CREATE TABLE table_1953516_1 (winning_span VARCHAR, country VARCHAR, name VARCHAR)
### ANSWER
SELECT winning_span FROM table_1953516_1 WHERE country = "England" AND name = "Paul Casey" | {
"answer": "SELECT winning_span FROM table_1953516_1 WHERE country = \"England\" AND name = \"Paul Casey\"",
"context": "CREATE TABLE table_1953516_1 (winning_span VARCHAR, country VARCHAR, name VARCHAR)",
"question": "What is the winning span in the country of England with the name of paul casey?"
} |
### QUESTION
Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.
### CONTEXT
CREATE TABLE performance (LOCATION VARCHAR, Attendance INTEGER)
### ANSWER
SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000 | {
"answer": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000",
"context": "CREATE TABLE performance (LOCATION VARCHAR, Attendance INTEGER)",
"question": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees."
} |
### QUESTION
Show the names of members and the location of the performances they attended.
### CONTEXT
CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
### ANSWER
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID | {
"answer": "SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID",
"context": "CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)",
"question": "Show the names of members and the location of the performances they attended."
} |
### QUESTION
Show the names of members and the location of performances they attended in ascending alphabetical order of their names.
### CONTEXT
CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
### ANSWER
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name | {
"answer": "SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name",
"context": "CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)",
"question": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names."
} |
### QUESTION
Show the dates of performances with attending members whose roles are "Violin".
### CONTEXT
CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Member_ID VARCHAR, Role VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
### ANSWER
SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin" | {
"answer": "SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = \"Violin\"",
"context": "CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Member_ID VARCHAR, Role VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)",
"question": "Show the dates of performances with attending members whose roles are \"Violin\"."
} |
### QUESTION
Show the names of members and the dates of performances they attended in descending order of attendance of the performances.
### CONTEXT
CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR, Attendance VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
### ANSWER
SELECT T2.Name, T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC | {
"answer": "SELECT T2.Name, T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC",
"context": "CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR, Attendance VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)",
"question": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances."
} |
### QUESTION
What is the average hexadecimal with a decimal less than 53, an octal less than 61, and a glyph greater than 0?
### CONTEXT
CREATE TABLE table_name_62 (hexadecimal INTEGER, glyph VARCHAR, decimal VARCHAR, octal VARCHAR)
### ANSWER
SELECT AVG(hexadecimal) FROM table_name_62 WHERE decimal < 53 AND octal < 61 AND glyph > 0 | {
"answer": "SELECT AVG(hexadecimal) FROM table_name_62 WHERE decimal < 53 AND octal < 61 AND glyph > 0",
"context": "CREATE TABLE table_name_62 (hexadecimal INTEGER, glyph VARCHAR, decimal VARCHAR, octal VARCHAR)",
"question": "What is the average hexadecimal with a decimal less than 53, an octal less than 61, and a glyph greater than 0?"
} |
### QUESTION
Name the lmp 1 winning team for rnd being 2 and adrian fernández luis díaz
### CONTEXT
CREATE TABLE table_19598014_2 (lmp1_winning_team VARCHAR, rnd VARCHAR, lmp2_winning_team VARCHAR)
### ANSWER
SELECT lmp1_winning_team FROM table_19598014_2 WHERE rnd = 2 AND lmp2_winning_team = "Adrian Fernández Luis Díaz" | {
"answer": "SELECT lmp1_winning_team FROM table_19598014_2 WHERE rnd = 2 AND lmp2_winning_team = \"Adrian Fernández Luis Díaz\"",
"context": "CREATE TABLE table_19598014_2 (lmp1_winning_team VARCHAR, rnd VARCHAR, lmp2_winning_team VARCHAR)",
"question": "Name the lmp 1 winning team for rnd being 2 and adrian fernández luis díaz"
} |
### QUESTION
What is the lowest octal with a 30 hexadecimal and less than 0 glyphs?
### CONTEXT
CREATE TABLE table_name_82 (octal INTEGER, hexadecimal VARCHAR, glyph VARCHAR)
### ANSWER
SELECT MIN(octal) FROM table_name_82 WHERE hexadecimal = 30 AND glyph < 0 | {
"answer": "SELECT MIN(octal) FROM table_name_82 WHERE hexadecimal = 30 AND glyph < 0",
"context": "CREATE TABLE table_name_82 (octal INTEGER, hexadecimal VARCHAR, glyph VARCHAR)",
"question": "What is the lowest octal with a 30 hexadecimal and less than 0 glyphs?"
} |
### QUESTION
Find the title of courses that have two prerequisites?
### CONTEXT
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR)
### ANSWER
SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2 | {
"answer": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2",
"context": "CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR)",
"question": "Find the title of courses that have two prerequisites?"
} |
### QUESTION
Find the title, credit, and department name of courses that have more than one prerequisites?
### CONTEXT
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, dept_name VARCHAR, course_id VARCHAR)
### ANSWER
SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1 | {
"answer": "SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1",
"context": "CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, dept_name VARCHAR, course_id VARCHAR)",
"question": "Find the title, credit, and department name of courses that have more than one prerequisites?"
} |
### QUESTION
Find the title of course that is provided by both Statistics and Psychology departments.
### CONTEXT
CREATE TABLE course (title VARCHAR, dept_name VARCHAR)
### ANSWER
SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology' | {
"answer": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'",
"context": "CREATE TABLE course (title VARCHAR, dept_name VARCHAR)",
"question": "Find the title of course that is provided by both Statistics and Psychology departments."
} |
### QUESTION
Find the title of course that is provided by Statistics but not Psychology departments.
### CONTEXT
CREATE TABLE course (title VARCHAR, dept_name VARCHAR)
### ANSWER
SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology' | {
"answer": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'",
"context": "CREATE TABLE course (title VARCHAR, dept_name VARCHAR)",
"question": "Find the title of course that is provided by Statistics but not Psychology departments."
} |
### QUESTION
How many to par has the winning score of 69-66-68=203.
### CONTEXT
CREATE TABLE table_19630743_2 (to_par VARCHAR, winning_score VARCHAR)
### ANSWER
SELECT to_par FROM table_19630743_2 WHERE winning_score = 69 - 66 - 68 = 203 | {
"answer": "SELECT to_par FROM table_19630743_2 WHERE winning_score = 69 - 66 - 68 = 203",
"context": "CREATE TABLE table_19630743_2 (to_par VARCHAR, winning_score VARCHAR)",
"question": "How many to par has the winning score of 69-66-68=203."
} |
### QUESTION
What horses does r. a. Scott own?
### CONTEXT
CREATE TABLE table_19624708_1 (horse VARCHAR, owner VARCHAR)
### ANSWER
SELECT horse FROM table_19624708_1 WHERE owner = "R. A. Scott" | {
"answer": "SELECT horse FROM table_19624708_1 WHERE owner = \"R. A. Scott\"",
"context": "CREATE TABLE table_19624708_1 (horse VARCHAR, owner VARCHAR)",
"question": "What horses does r. a. Scott own?"
} |
### QUESTION
Find the names of the top 3 departments that provide the largest amount of courses?
### CONTEXT
CREATE TABLE course (dept_name VARCHAR)
### ANSWER
SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3 | {
"answer": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3",
"context": "CREATE TABLE course (dept_name VARCHAR)",
"question": "Find the names of the top 3 departments that provide the largest amount of courses?"
} |
### QUESTION
Find the name of students who took any class in the years of 2009 and 2010.
### CONTEXT
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (id VARCHAR)
### ANSWER
SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010 | {
"answer": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010",
"context": "CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (id VARCHAR)",
"question": "Find the name of students who took any class in the years of 2009 and 2010."
} |
### QUESTION
Which Scores by each individual judge has a Date performed of august 7, and a Main contestant of karanvir bohra?
### CONTEXT
CREATE TABLE table_name_87 (scores_by_each_individual_judge VARCHAR, date_performed VARCHAR, main_contestant VARCHAR)
### ANSWER
SELECT scores_by_each_individual_judge FROM table_name_87 WHERE date_performed = "august 7" AND main_contestant = "karanvir bohra" | {
"answer": "SELECT scores_by_each_individual_judge FROM table_name_87 WHERE date_performed = \"august 7\" AND main_contestant = \"karanvir bohra\"",
"context": "CREATE TABLE table_name_87 (scores_by_each_individual_judge VARCHAR, date_performed VARCHAR, main_contestant VARCHAR)",
"question": "Which Scores by each individual judge has a Date performed of august 7, and a Main contestant of karanvir bohra?"
} |
### QUESTION
What is the digital of Virgin [analogue]?
### CONTEXT
CREATE TABLE table_name_24 (digital VARCHAR, provider VARCHAR)
### ANSWER
SELECT digital FROM table_name_24 WHERE provider = "virgin [analogue]" | {
"answer": "SELECT digital FROM table_name_24 WHERE provider = \"virgin [analogue]\"",
"context": "CREATE TABLE table_name_24 (digital VARCHAR, provider VARCHAR)",
"question": "What is the digital of Virgin [analogue]?"
} |
### QUESTION
What is the fleet number when the length (ft) is 30?
### CONTEXT
CREATE TABLE table_19643196_1 (fleet__number VARCHAR, length__ft_ VARCHAR)
### ANSWER
SELECT fleet__number FROM table_19643196_1 WHERE length__ft_ = 30 | {
"answer": "SELECT fleet__number FROM table_19643196_1 WHERE length__ft_ = 30",
"context": "CREATE TABLE table_19643196_1 (fleet__number VARCHAR, length__ft_ VARCHAR)",
"question": "What is the fleet number when the length (ft) is 30?"
} |
### QUESTION
How many analogue satellite channels does Sky [Analogue] have?
### CONTEXT
CREATE TABLE table_name_87 (no_of_channels VARCHAR, transmission VARCHAR, provider VARCHAR)
### ANSWER
SELECT no_of_channels FROM table_name_87 WHERE transmission = "analogue satellite" AND provider = "sky [analogue]" | {
"answer": "SELECT no_of_channels FROM table_name_87 WHERE transmission = \"analogue satellite\" AND provider = \"sky [analogue]\"",
"context": "CREATE TABLE table_name_87 (no_of_channels VARCHAR, transmission VARCHAR, provider VARCHAR)",
"question": "How many analogue satellite channels does Sky [Analogue] have?"
} |
### QUESTION
Find the name of instructors who are advising more than one student.
### CONTEXT
CREATE TABLE advisor (i_id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)
### ANSWER
SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1 | {
"answer": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1",
"context": "CREATE TABLE advisor (i_id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)",
"question": "Find the name of instructors who are advising more than one student."
} |
### QUESTION
list in alphabetic order all course names and their instructors' names in year 2008.
### CONTEXT
CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE teaches (course_id VARCHAR, id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)
### ANSWER
SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title | {
"answer": "SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title",
"context": "CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE teaches (course_id VARCHAR, id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)",
"question": "list in alphabetic order all course names and their instructors' names in year 2008."
} |
### QUESTION
What was Week 14 when Week 13 was Nebraska (8-2)?
### CONTEXT
CREATE TABLE table_name_37 (week_14_nov_27 VARCHAR, week_13_nov_20 VARCHAR)
### ANSWER
SELECT week_14_nov_27 FROM table_name_37 WHERE week_13_nov_20 = "nebraska (8-2)" | {
"answer": "SELECT week_14_nov_27 FROM table_name_37 WHERE week_13_nov_20 = \"nebraska (8-2)\"",
"context": "CREATE TABLE table_name_37 (week_14_nov_27 VARCHAR, week_13_nov_20 VARCHAR)",
"question": "What was Week 14 when Week 13 was Nebraska (8-2)?"
} |
### QUESTION
Find the minimum salary for the departments whose average salary is above the average payment of all instructors.
### CONTEXT
CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
### ANSWER
SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor) | {
"answer": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)",
"context": "CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)",
"question": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors."
} |
### QUESTION
What Championship has a Date of 26 may 1986?
### CONTEXT
CREATE TABLE table_name_66 (championship VARCHAR, date VARCHAR)
### ANSWER
SELECT championship FROM table_name_66 WHERE date = "26 may 1986" | {
"answer": "SELECT championship FROM table_name_66 WHERE date = \"26 may 1986\"",
"context": "CREATE TABLE table_name_66 (championship VARCHAR, date VARCHAR)",
"question": "What Championship has a Date of 26 may 1986?"
} |
### QUESTION
What's the nationality of the player coming from Edmonton Oil Kings (WCHL)?
### CONTEXT
CREATE TABLE table_1965650_4 (nationality VARCHAR, college_junior_club_team VARCHAR)
### ANSWER
SELECT nationality FROM table_1965650_4 WHERE college_junior_club_team = "Edmonton Oil Kings (WCHL)" | {
"answer": "SELECT nationality FROM table_1965650_4 WHERE college_junior_club_team = \"Edmonton Oil Kings (WCHL)\"",
"context": "CREATE TABLE table_1965650_4 (nationality VARCHAR, college_junior_club_team VARCHAR)",
"question": "What's the nationality of the player coming from Edmonton Oil Kings (WCHL)?"
} |
### QUESTION
Find the semester and year which has the least number of student taking any class.
### CONTEXT
CREATE TABLE takes (semester VARCHAR, YEAR VARCHAR)
### ANSWER
SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1 | {
"answer": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1",
"context": "CREATE TABLE takes (semester VARCHAR, YEAR VARCHAR)",
"question": "Find the semester and year which has the least number of student taking any class."
} |
### QUESTION
What is the id of the instructor who advises of all students from History department?
### CONTEXT
CREATE TABLE advisor (s_id VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR)
### ANSWER
SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' | {
"answer": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'",
"context": "CREATE TABLE advisor (s_id VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR)",
"question": "What is the id of the instructor who advises of all students from History department?"
} |
### QUESTION
Find the name and salary of the instructors who are advisors of any student from History department?
### CONTEXT
CREATE TABLE instructor (name VARCHAR, salary VARCHAR, id VARCHAR); CREATE TABLE advisor (i_id VARCHAR, s_id VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR)
### ANSWER
SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History' | {
"answer": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'",
"context": "CREATE TABLE instructor (name VARCHAR, salary VARCHAR, id VARCHAR); CREATE TABLE advisor (i_id VARCHAR, s_id VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR)",
"question": "Find the name and salary of the instructors who are advisors of any student from History department?"
} |
### QUESTION
When sault ste. marie greyhounds (oha) is the college, junior, or club team how many nationalities are there?
### CONTEXT
CREATE TABLE table_1965650_9 (nationality VARCHAR, college_junior_club_team VARCHAR)
### ANSWER
SELECT COUNT(nationality) FROM table_1965650_9 WHERE college_junior_club_team = "Sault Ste. Marie Greyhounds (OHA)" | {
"answer": "SELECT COUNT(nationality) FROM table_1965650_9 WHERE college_junior_club_team = \"Sault Ste. Marie Greyhounds (OHA)\"",
"context": "CREATE TABLE table_1965650_9 (nationality VARCHAR, college_junior_club_team VARCHAR)",
"question": "When sault ste. marie greyhounds (oha) is the college, junior, or club team how many nationalities are there?"
} |
### QUESTION
What is the title of the prerequisite class of International Finance course?
### CONTEXT
CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)
### ANSWER
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance') | {
"answer": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')",
"context": "CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)",
"question": "What is the title of the prerequisite class of International Finance course?"
} |
### QUESTION
Find the title of course whose prerequisite is course Differential Geometry.
### CONTEXT
CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)
### ANSWER
SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry') | {
"answer": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')",
"context": "CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)",
"question": "Find the title of course whose prerequisite is course Differential Geometry."
} |
### QUESTION
How many race 1's have 5 as the race 3, with points less than 59?
### CONTEXT
CREATE TABLE table_name_45 (race_1 INTEGER, race_3 VARCHAR, points VARCHAR)
### ANSWER
SELECT SUM(race_1) FROM table_name_45 WHERE race_3 = "5" AND points < 59 | {
"answer": "SELECT SUM(race_1) FROM table_name_45 WHERE race_3 = \"5\" AND points < 59",
"context": "CREATE TABLE table_name_45 (race_1 INTEGER, race_3 VARCHAR, points VARCHAR)",
"question": "How many race 1's have 5 as the race 3, with points less than 59?"
} |
### QUESTION
Who is from south africa and has a score of 76-75-73-71=295?
### CONTEXT
CREATE TABLE table_name_25 (player VARCHAR, country VARCHAR, score VARCHAR)
### ANSWER
SELECT player FROM table_name_25 WHERE country = "south africa" AND score = 76 - 75 - 73 - 71 = 295 | {
"answer": "SELECT player FROM table_name_25 WHERE country = \"south africa\" AND score = 76 - 75 - 73 - 71 = 295",
"context": "CREATE TABLE table_name_25 (player VARCHAR, country VARCHAR, score VARCHAR)",
"question": "Who is from south africa and has a score of 76-75-73-71=295?"
} |
### QUESTION
Find the name of the instructors who taught C Programming course before.
### CONTEXT
CREATE TABLE teaches (id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)
### ANSWER
SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming' | {
"answer": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'",
"context": "CREATE TABLE teaches (id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)",
"question": "Find the name of the instructors who taught C Programming course before."
} |
### QUESTION
How many times was country considered when starky % was 20.96%
### CONTEXT
CREATE TABLE table_19681738_1 (county VARCHAR, starky__percentage VARCHAR)
### ANSWER
SELECT COUNT(county) FROM table_19681738_1 WHERE starky__percentage = "20.96%" | {
"answer": "SELECT COUNT(county) FROM table_19681738_1 WHERE starky__percentage = \"20.96%\"",
"context": "CREATE TABLE table_19681738_1 (county VARCHAR, starky__percentage VARCHAR)",
"question": "How many times was country considered when starky % was 20.96%"
} |
### QUESTION
What is the course title of the prerequisite of course Mobile Computing?
### CONTEXT
CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)
### ANSWER
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing') | {
"answer": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')",
"context": "CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR)",
"question": "What is the course title of the prerequisite of course Mobile Computing?"
} |
### QUESTION
Find the name of instructor who is the advisor of the student who has the highest number of total credits.
### CONTEXT
CREATE TABLE student (id VARCHAR, tot_cred VARCHAR); CREATE TABLE advisor (i_id VARCHAR, s_id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)
### ANSWER
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1 | {
"answer": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1",
"context": "CREATE TABLE student (id VARCHAR, tot_cred VARCHAR); CREATE TABLE advisor (i_id VARCHAR, s_id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)",
"question": "Find the name of instructor who is the advisor of the student who has the highest number of total credits."
} |
### QUESTION
Find the number and averaged salary of all instructors who are in the department with the highest budget.
### CONTEXT
CREATE TABLE department (dept_name VARCHAR, budget VARCHAR); CREATE TABLE instructor (salary INTEGER, dept_name VARCHAR)
### ANSWER
SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1 | {
"answer": "SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1",
"context": "CREATE TABLE department (dept_name VARCHAR, budget VARCHAR); CREATE TABLE instructor (salary INTEGER, dept_name VARCHAR)",
"question": "Find the number and averaged salary of all instructors who are in the department with the highest budget."
} |
### QUESTION
What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?
### CONTEXT
CREATE TABLE SECTION (course_id VARCHAR, building VARCHAR, room_number VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, course_id VARCHAR); CREATE TABLE classroom (capacity INTEGER, building VARCHAR, room_number VARCHAR); CREATE TABLE classroom (capacity INTEGER)
### ANSWER
SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom) | {
"answer": "SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom)",
"context": "CREATE TABLE SECTION (course_id VARCHAR, building VARCHAR, room_number VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, course_id VARCHAR); CREATE TABLE classroom (capacity INTEGER, building VARCHAR, room_number VARCHAR); CREATE TABLE classroom (capacity INTEGER)",
"question": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?"
} |
### QUESTION
Find the name of students who didn't take any course from Biology department.
### CONTEXT
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR); CREATE TABLE takes (id VARCHAR, course_id VARCHAR)
### ANSWER
SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology') | {
"answer": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')",
"context": "CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR); CREATE TABLE takes (id VARCHAR, course_id VARCHAR)",
"question": "Find the name of students who didn't take any course from Biology department."
} |
### QUESTION
Find the total number of students and total number of instructors for each department.
### CONTEXT
CREATE TABLE department (dept_name VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR); CREATE TABLE instructor (dept_name VARCHAR, id VARCHAR)
### ANSWER
SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name | {
"answer": "SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name",
"context": "CREATE TABLE department (dept_name VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR); CREATE TABLE instructor (dept_name VARCHAR, id VARCHAR)",
"question": "Find the total number of students and total number of instructors for each department."
} |
### QUESTION
What is the population when the Per capita income of $18,884, and a Number of households smaller than 14,485?
### CONTEXT
CREATE TABLE table_name_98 (population INTEGER, per_capita_income VARCHAR, number_of_households VARCHAR)
### ANSWER
SELECT SUM(population) FROM table_name_98 WHERE per_capita_income = "$18,884" AND number_of_households < 14 OFFSET 485 | {
"answer": "SELECT SUM(population) FROM table_name_98 WHERE per_capita_income = \"$18,884\" AND number_of_households < 14 OFFSET 485",
"context": "CREATE TABLE table_name_98 (population INTEGER, per_capita_income VARCHAR, number_of_households VARCHAR)",
"question": "What is the population when the Per capita income of $18,884, and a Number of households smaller than 14,485?"
} |
### QUESTION
Find the name of students who have taken the prerequisite course of the course with title International Finance.
### CONTEXT
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE takes (id VARCHAR, course_id VARCHAR)
### ANSWER
SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance') | {
"answer": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')",
"context": "CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, title VARCHAR); CREATE TABLE prereq (prereq_id VARCHAR, course_id VARCHAR); CREATE TABLE takes (id VARCHAR, course_id VARCHAR)",
"question": "Find the name of students who have taken the prerequisite course of the course with title International Finance."
} |
### QUESTION
Find the name of students who took some course offered by Statistics department.
### CONTEXT
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (course_id VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)
### ANSWER
SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics' | {
"answer": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'",
"context": "CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (course_id VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)",
"question": "Find the name of students who took some course offered by Statistics department."
} |
### QUESTION
Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.
### CONTEXT
CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR)
### ANSWER
SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics') | {
"answer": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')",
"context": "CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR)",
"question": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department."
} |
### QUESTION
What is the highest kneel with a stand less than 187, and a 197 prone, and a qual more than 576?
### CONTEXT
CREATE TABLE table_name_59 (kneel INTEGER, qual VARCHAR, stand VARCHAR, prone VARCHAR)
### ANSWER
SELECT MAX(kneel) FROM table_name_59 WHERE stand < 187 AND prone = 197 AND qual > 576 | {
"answer": "SELECT MAX(kneel) FROM table_name_59 WHERE stand < 187 AND prone = 197 AND qual > 576",
"context": "CREATE TABLE table_name_59 (kneel INTEGER, qual VARCHAR, stand VARCHAR, prone VARCHAR)",
"question": "What is the highest kneel with a stand less than 187, and a 197 prone, and a qual more than 576?"
} |
### QUESTION
Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.
### CONTEXT
CREATE TABLE SECTION (building VARCHAR, room_number VARCHAR, semester VARCHAR, year VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR, title VARCHAR)
### ANSWER
SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title | {
"answer": "SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title",
"context": "CREATE TABLE SECTION (building VARCHAR, room_number VARCHAR, semester VARCHAR, year VARCHAR, course_id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR, title VARCHAR)",
"question": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles."
} |
### QUESTION
What is the venue for the friendly competition at Dreisamstadion, Freiburg?
### CONTEXT
CREATE TABLE table_name_52 (score VARCHAR, competition VARCHAR, venue VARCHAR)
### ANSWER
SELECT score FROM table_name_52 WHERE competition = "friendly" AND venue = "dreisamstadion, freiburg" | {
"answer": "SELECT score FROM table_name_52 WHERE competition = \"friendly\" AND venue = \"dreisamstadion, freiburg\"",
"context": "CREATE TABLE table_name_52 (score VARCHAR, competition VARCHAR, venue VARCHAR)",
"question": "What is the venue for the friendly competition at Dreisamstadion, Freiburg?"
} |
### QUESTION
Find the names of all instructors in the Art department who have taught some course and the course_id.
### CONTEXT
CREATE TABLE instructor (ID VARCHAR, dept_name VARCHAR); CREATE TABLE teaches (ID VARCHAR)
### ANSWER
SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art' | {
"answer": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'",
"context": "CREATE TABLE instructor (ID VARCHAR, dept_name VARCHAR); CREATE TABLE teaches (ID VARCHAR)",
"question": "Find the names of all instructors in the Art department who have taught some course and the course_id."
} |
### QUESTION
How many elections had 1423 average voters per candidate?
### CONTEXT
CREATE TABLE table_19698421_1 (change__percentage_points_ VARCHAR, average_voters_per_candidate VARCHAR)
### ANSWER
SELECT COUNT(change__percentage_points_) FROM table_19698421_1 WHERE average_voters_per_candidate = 1423 | {
"answer": "SELECT COUNT(change__percentage_points_) FROM table_19698421_1 WHERE average_voters_per_candidate = 1423",
"context": "CREATE TABLE table_19698421_1 (change__percentage_points_ VARCHAR, average_voters_per_candidate VARCHAR)",
"question": "How many elections had 1423 average voters per candidate?"
} |
### QUESTION
Find courses that ran in Fall 2009 or in Spring 2010.
### CONTEXT
CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
### ANSWER
SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 | {
"answer": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010",
"context": "CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)",
"question": "Find courses that ran in Fall 2009 or in Spring 2010."
} |
### QUESTION
Find courses that ran in Fall 2009 and in Spring 2010.
### CONTEXT
CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
### ANSWER
SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 | {
"answer": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010",
"context": "CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)",
"question": "Find courses that ran in Fall 2009 and in Spring 2010."
} |
### QUESTION
Find courses that ran in Fall 2009 but not in Spring 2010.
### CONTEXT
CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
### ANSWER
SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 | {
"answer": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010",
"context": "CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)",
"question": "Find courses that ran in Fall 2009 but not in Spring 2010."
} |
### QUESTION
when the max speed for modified speed (6th gear) where standard speed (6th gear) is 98
### CONTEXT
CREATE TABLE table_19704392_1 (modified_speed__6th_gear_ INTEGER, standard_speed__6th_gear_ VARCHAR)
### ANSWER
SELECT MAX(modified_speed__6th_gear_) FROM table_19704392_1 WHERE standard_speed__6th_gear_ = "98" | {
"answer": "SELECT MAX(modified_speed__6th_gear_) FROM table_19704392_1 WHERE standard_speed__6th_gear_ = \"98\"",
"context": "CREATE TABLE table_19704392_1 (modified_speed__6th_gear_ INTEGER, standard_speed__6th_gear_ VARCHAR)",
"question": "when the max speed for modified speed (6th gear) where standard speed (6th gear) is 98"
} |
### QUESTION
Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.
### CONTEXT
CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR)
### ANSWER
SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology') | {
"answer": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')",
"context": "CREATE TABLE instructor (name VARCHAR, salary INTEGER, dept_name VARCHAR)",
"question": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department."
} |
### QUESTION
What's the mountains classification of Stage 7 when Kim Kirchen was the general classification?
### CONTEXT
CREATE TABLE table_name_82 (mountains_classification VARCHAR, general_classification VARCHAR, stage VARCHAR)
### ANSWER
SELECT mountains_classification FROM table_name_82 WHERE general_classification = "kim kirchen" AND stage = "7" | {
"answer": "SELECT mountains_classification FROM table_name_82 WHERE general_classification = \"kim kirchen\" AND stage = \"7\"",
"context": "CREATE TABLE table_name_82 (mountains_classification VARCHAR, general_classification VARCHAR, stage VARCHAR)",
"question": "What's the mountains classification of Stage 7 when Kim Kirchen was the general classification?"
} |
### QUESTION
What was the production number of the episode filmed in aug/sept 1968?
### CONTEXT
CREATE TABLE table_1971734_1 (prod__number VARCHAR, filmed VARCHAR)
### ANSWER
SELECT prod__number FROM table_1971734_1 WHERE filmed = "Aug/Sept 1968" | {
"answer": "SELECT prod__number FROM table_1971734_1 WHERE filmed = \"Aug/Sept 1968\"",
"context": "CREATE TABLE table_1971734_1 (prod__number VARCHAR, filmed VARCHAR)",
"question": "What was the production number of the episode filmed in aug/sept 1968?"
} |
### QUESTION
Show the names of people, and dates and venues of debates they are on the affirmative side.
### CONTEXT
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Date VARCHAR, Venue VARCHAR, Debate_ID VARCHAR); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR)
### ANSWER
SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID | {
"answer": "SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID",
"context": "CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Date VARCHAR, Venue VARCHAR, Debate_ID VARCHAR); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR)",
"question": "Show the names of people, and dates and venues of debates they are on the affirmative side."
} |
### QUESTION
Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.
### CONTEXT
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Date VARCHAR, Venue VARCHAR, Debate_ID VARCHAR); CREATE TABLE debate_people (Debate_ID VARCHAR, Negative VARCHAR)
### ANSWER
SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name | {
"answer": "SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name",
"context": "CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Date VARCHAR, Venue VARCHAR, Debate_ID VARCHAR); CREATE TABLE debate_people (Debate_ID VARCHAR, Negative VARCHAR)",
"question": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name."
} |
### QUESTION
Show the names of people that are on affirmative side of debates with number of audience bigger than 200.
### CONTEXT
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Debate_ID VARCHAR, Num_of_Audience INTEGER); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR)
### ANSWER
SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200 | {
"answer": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200",
"context": "CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Debate_ID VARCHAR, Num_of_Audience INTEGER); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR)",
"question": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200."
} |
### QUESTION
Show the names of people and the number of times they have been on the affirmative side of debates.
### CONTEXT
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate_people (Affirmative VARCHAR)
### ANSWER
SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name | {
"answer": "SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name",
"context": "CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate_people (Affirmative VARCHAR)",
"question": "Show the names of people and the number of times they have been on the affirmative side of debates."
} |
### QUESTION
How many different isolation numbers does the Jack Mountain peak have?
### CONTEXT
CREATE TABLE table_19716903_1 (isolation VARCHAR, mountain_peak VARCHAR)
### ANSWER
SELECT COUNT(isolation) FROM table_19716903_1 WHERE mountain_peak = "Jack Mountain" | {
"answer": "SELECT COUNT(isolation) FROM table_19716903_1 WHERE mountain_peak = \"Jack Mountain\"",
"context": "CREATE TABLE table_19716903_1 (isolation VARCHAR, mountain_peak VARCHAR)",
"question": "How many different isolation numbers does the Jack Mountain peak have?"
} |
### QUESTION
Find all the policy type codes associated with the customer "Dayana Robel"
### CONTEXT
CREATE TABLE customers (customer_id VARCHAR, customer_details VARCHAR); CREATE TABLE policies (customer_id VARCHAR)
### ANSWER
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = "Dayana Robel" | {
"answer": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = \"Dayana Robel\"",
"context": "CREATE TABLE customers (customer_id VARCHAR, customer_details VARCHAR); CREATE TABLE policies (customer_id VARCHAR)",
"question": "Find all the policy type codes associated with the customer \"Dayana Robel\""
} |
### QUESTION
What is the name of the customer who has made the largest amount of claim in a single claim?
### CONTEXT
CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (amount_claimed INTEGER); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_claimed INTEGER)
### ANSWER
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers) | {
"answer": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers)",
"context": "CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (amount_claimed INTEGER); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_claimed INTEGER)",
"question": "What is the name of the customer who has made the largest amount of claim in a single claim?"
} |
### QUESTION
What is the name of the customer who has made the minimum amount of payment in one claim?
### CONTEXT
CREATE TABLE claim_headers (amount_piad INTEGER); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_piad INTEGER)
### ANSWER
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers) | {
"answer": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)",
"context": "CREATE TABLE claim_headers (amount_piad INTEGER); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_piad INTEGER)",
"question": "What is the name of the customer who has made the minimum amount of payment in one claim?"
} |
### QUESTION
Find the names of customers who have no policies associated.
### CONTEXT
CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_details VARCHAR); CREATE TABLE policies (customer_id VARCHAR)
### ANSWER
SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id | {
"answer": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id",
"context": "CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_details VARCHAR); CREATE TABLE policies (customer_id VARCHAR)",
"question": "Find the names of customers who have no policies associated."
} |
### QUESTION
What is the name of the claim processing stage that most of the claims are on?
### CONTEXT
CREATE TABLE claims_processing (claim_stage_id VARCHAR); CREATE TABLE claims_processing_stages (claim_status_name VARCHAR, claim_stage_id VARCHAR)
### ANSWER
SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1 | {
"answer": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE claims_processing (claim_stage_id VARCHAR); CREATE TABLE claims_processing_stages (claim_status_name VARCHAR, claim_stage_id VARCHAR)",
"question": "What is the name of the claim processing stage that most of the claims are on?"
} |
### QUESTION
Find the names of the customers who have an deputy policy.
### CONTEXT
CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" | {
"answer": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\"",
"context": "CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)",
"question": "Find the names of the customers who have an deputy policy."
} |
### QUESTION
Find the names of customers who either have an deputy policy or uniformed policy.
### CONTEXT
CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform" | {
"answer": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\" OR t1.policy_type_code = \"Uniform\"",
"context": "CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)",
"question": "Find the names of customers who either have an deputy policy or uniformed policy."
} |
### QUESTION
Find the name of the customer that has been involved in the most policies.
### CONTEXT
CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (customer_id VARCHAR)
### ANSWER
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1 | {
"answer": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (customer_id VARCHAR)",
"question": "Find the name of the customer that has been involved in the most policies."
} |
### QUESTION
Which customer is associated with the latest policy?
### CONTEXT
CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (start_date INTEGER); CREATE TABLE policies (customer_id VARCHAR, start_date INTEGER)
### ANSWER
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies) | {
"answer": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies)",
"context": "CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (start_date INTEGER); CREATE TABLE policies (customer_id VARCHAR, start_date INTEGER)",
"question": "Which customer is associated with the latest policy?"
} |
### QUESTION
Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.
### CONTEXT
CREATE TABLE Accounts (account_id VARCHAR, date_account_opened VARCHAR, account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR)
### ANSWER
SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | {
"answer": "SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'",
"context": "CREATE TABLE Accounts (account_id VARCHAR, date_account_opened VARCHAR, account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR)",
"question": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'."
} |
### QUESTION
Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.
### CONTEXT
CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR, customer_last_name VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling" | {
"answer": "SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Meaghan\" AND T2.customer_last_name = \"Keeling\"",
"context": "CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR, customer_last_name VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR)",
"question": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling."
} |
### QUESTION
Show the unique first names, last names, and phone numbers for all customers with any account.
### CONTEXT
CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, phone_number VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id | {
"answer": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id",
"context": "CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, phone_number VARCHAR, customer_id VARCHAR)",
"question": "Show the unique first names, last names, and phone numbers for all customers with any account."
} |
### QUESTION
What is the customer id, first and last name with most number of accounts.
### CONTEXT
CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 | {
"answer": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, customer_id VARCHAR)",
"question": "What is the customer id, first and last name with most number of accounts."
} |
### QUESTION
Show id, first name and last name for all customers and the number of accounts.
### CONTEXT
CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id | {
"answer": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id",
"context": "CREATE TABLE Accounts (customer_id VARCHAR); CREATE TABLE Customers (customer_first_name VARCHAR, customer_last_name VARCHAR, customer_id VARCHAR)",
"question": "Show id, first name and last name for all customers and the number of accounts."
} |
### QUESTION
Show first name and id for all customers with at least 2 accounts.
### CONTEXT
CREATE TABLE Customers (customer_first_name VARCHAR, customer_id VARCHAR); CREATE TABLE Accounts (customer_id VARCHAR)
### ANSWER
SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 | {
"answer": "SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2",
"context": "CREATE TABLE Customers (customer_first_name VARCHAR, customer_id VARCHAR); CREATE TABLE Accounts (customer_id VARCHAR)",
"question": "Show first name and id for all customers with at least 2 accounts."
} |
### QUESTION
How many transaction does account with name 337 have?
### CONTEXT
CREATE TABLE Accounts (account_id VARCHAR, account_name VARCHAR); CREATE TABLE Financial_transactions (account_id VARCHAR)
### ANSWER
SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = "337" | {
"answer": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"",
"context": "CREATE TABLE Accounts (account_id VARCHAR, account_name VARCHAR); CREATE TABLE Financial_transactions (account_id VARCHAR)",
"question": "How many transaction does account with name 337 have?"
} |
### QUESTION
What is the average, minimum, maximum, and total transaction amount?
### CONTEXT
CREATE TABLE Financial_transactions (transaction_amount INTEGER)
### ANSWER
SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions | {
"answer": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions",
"context": "CREATE TABLE Financial_transactions (transaction_amount INTEGER)",
"question": "What is the average, minimum, maximum, and total transaction amount?"
} |
### QUESTION
Show the account name, id and the number of transactions for each account.
### CONTEXT
CREATE TABLE Financial_transactions (account_id VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, account_id VARCHAR)
### ANSWER
SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id | {
"answer": "SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id",
"context": "CREATE TABLE Financial_transactions (account_id VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, account_id VARCHAR)",
"question": "Show the account name, id and the number of transactions for each account."
} |
### QUESTION
Show the account id and name with at least 4 transactions.
### CONTEXT
CREATE TABLE Financial_transactions (account_id VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, account_id VARCHAR)
### ANSWER
SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4 | {
"answer": "SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4",
"context": "CREATE TABLE Financial_transactions (account_id VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, account_id VARCHAR)",
"question": "Show the account id and name with at least 4 transactions."
} |
### QUESTION
What year was the congressional service elected for a term beginning on January 3, 1989?
### CONTEXT
CREATE TABLE table_197446_1 (elected VARCHAR, term_began VARCHAR)
### ANSWER
SELECT elected FROM table_197446_1 WHERE term_began = "January 3, 1989" | {
"answer": "SELECT elected FROM table_197446_1 WHERE term_began = \"January 3, 1989\"",
"context": "CREATE TABLE table_197446_1 (elected VARCHAR, term_began VARCHAR)",
"question": "What year was the congressional service elected for a term beginning on January 3, 1989?"
} |
### QUESTION
What is the invoice number and invoice date for the invoice with most number of transactions?
### CONTEXT
CREATE TABLE Invoices (invoice_number VARCHAR, invoice_date VARCHAR); CREATE TABLE Financial_transactions (invoice_number VARCHAR)
### ANSWER
SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1 | {
"answer": "SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE Invoices (invoice_number VARCHAR, invoice_date VARCHAR); CREATE TABLE Financial_transactions (invoice_number VARCHAR)",
"question": "What is the invoice number and invoice date for the invoice with most number of transactions?"
} |
### QUESTION
Show invoice dates and order id and details for all invoices.
### CONTEXT
CREATE TABLE Invoices (invoice_date VARCHAR, order_id VARCHAR); CREATE TABLE Orders (order_details VARCHAR, order_id VARCHAR)
### ANSWER
SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id | {
"answer": "SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id",
"context": "CREATE TABLE Invoices (invoice_date VARCHAR, order_id VARCHAR); CREATE TABLE Orders (order_details VARCHAR, order_id VARCHAR)",
"question": "Show invoice dates and order id and details for all invoices."
} |
### QUESTION
What is the customer last name, id and phone number with most number of orders?
### CONTEXT
CREATE TABLE Orders (customer_id VARCHAR); CREATE TABLE Customers (customer_last_name VARCHAR, phone_number VARCHAR, customer_id VARCHAR)
### ANSWER
SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 | {
"answer": "SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1",
"context": "CREATE TABLE Orders (customer_id VARCHAR); CREATE TABLE Customers (customer_last_name VARCHAR, phone_number VARCHAR, customer_id VARCHAR)",
"question": "What is the customer last name, id and phone number with most number of orders?"
} |
### QUESTION
Show all product names without an order.
### CONTEXT
CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_id VARCHAR); CREATE TABLE Products (product_name VARCHAR)
### ANSWER
SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id | {
"answer": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id",
"context": "CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_id VARCHAR); CREATE TABLE Products (product_name VARCHAR)",
"question": "Show all product names without an order."
} |
### QUESTION
Show all product names and the total quantity ordered for each product name.
### CONTEXT
CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_quantity INTEGER, product_id VARCHAR)
### ANSWER
SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name | {
"answer": "SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name",
"context": "CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_quantity INTEGER, product_id VARCHAR)",
"question": "Show all product names and the total quantity ordered for each product name."
} |
### QUESTION
Can you tell me the Year(s) Won that has the Country of united states, and the Total larger than 152?
### CONTEXT
CREATE TABLE table_name_62 (year_s__won VARCHAR, country VARCHAR, total VARCHAR)
### ANSWER
SELECT year_s__won FROM table_name_62 WHERE country = "united states" AND total > 152 | {
"answer": "SELECT year_s__won FROM table_name_62 WHERE country = \"united states\" AND total > 152",
"context": "CREATE TABLE table_name_62 (year_s__won VARCHAR, country VARCHAR, total VARCHAR)",
"question": "Can you tell me the Year(s) Won that has the Country of united states, and the Total larger than 152?"
} |
Subsets and Splits