db_id
stringclasses
20 values
query
stringlengths
20
422
question
stringlengths
18
174
query_toks
listlengths
4
63
query_toks_no_value
listlengths
4
88
question_toks
listlengths
5
33
schema
stringclasses
20 values
course_teach
SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID
What is the name of each teacher and what course they teach?
[ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID" ]
[ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "...
[ "What", "is", "the", "name", "of", "each", "teacher", "and", "what", "course", "they", "teach", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name
Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
[ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ]
[ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "...
[ "Show", "names", "of", "teachers", "and", "the", "courses", "they", "are", "arranged", "to", "teach", "in", "ascending", "alphabetical", "order", "of", "the", "teacher", "'s", "name", "." ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name
What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?
[ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ]
[ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "...
[ "What", "are", "the", "names", "of", "the", "teachers", "and", "the", "courses", "they", "teach", "in", "ascending", "alphabetical", "order", "by", "the", "name", "of", "the", "teacher", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math"
Show the name of the teacher for the math course.
[ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ]
[ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "whe...
[ "Show", "the", "name", "of", "the", "teacher", "for", "the", "math", "course", "." ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math"
What are the names of the people who teach math courses?
[ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ]
[ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "whe...
[ "What", "are", "the", "names", "of", "the", "people", "who", "teach", "math", "courses", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name
Show names of teachers and the number of courses they teach.
[ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ]
[ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ]
[ "Show", "names", "of", "teachers", "and", "the", "number", "of", "courses", "they", "teach", "." ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name
What are the names of the teachers and how many courses do they teach?
[ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ]
[ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ]
[ "What", "are", "the", "names", "of", "the", "teachers", "and", "how", "many", "courses", "do", "they", "teach", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2
Show names of teachers that teach at least two courses.
[ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "names", "of", "teachers", "that", "teach", "at", "least", "two", "courses", "." ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2
What are the names of the teachers who teach at least two courses?
[ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "names", "of", "the", "teachers", "who", "teach", "at", "least", "two", "courses", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
List the names of teachers who have not been arranged to teach courses.
[ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ]
[ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ]
[ "List", "the", "names", "of", "teachers", "who", "have", "not", "been", "arranged", "to", "teach", "courses", "." ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
course_teach
SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
What are the names of the teachers whose courses have not been arranged?
[ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ]
[ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ]
[ "What", "are", "the", "names", "of", "the", "teachers", "whose", "courses", "have", "not", "been", "arranged", "?" ]
CREATE TABLE course ( Course_ID NUMBER PRIMARY KEY, Staring_Date TEXT, Course TEXT ); CREATE TABLE teacher ( Teacher_ID NUMBER PRIMARY KEY, Name TEXT, Age TEXT, Hometown TEXT ); CREATE TABLE course_arrange ( Course_ID NUMBER PRIMARY KEY, Teacher_ID NUMBER, Grade NUMBER, FOREIGN KEY (Course_ID) R...
museum_visit
SELECT count(*) FROM visitor WHERE age < 30
How many visitors below age 30 are there?
[ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "age", "<", "30" ]
[ "select", "count", "(", "*", ")", "from", "visitor", "where", "age", "<", "value" ]
[ "How", "many", "visitors", "below", "age", "30", "are", "there", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC
Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
[ "SELECT", "name", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "Level_of_membership", "DESC" ]
[ "select", "name", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "level_of_membership", "desc" ]
[ "Find", "the", "names", "of", "the", "visitors", "whose", "membership", "level", "is", "higher", "than", "4", ",", "and", "order", "the", "results", "by", "the", "level", "from", "high", "to", "low", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT avg(age) FROM visitor WHERE Level_of_membership <= 4
What is the average age of the visitors whose membership level is not higher than 4?
[ "SELECT", "avg", "(", "age", ")", "FROM", "visitor", "WHERE", "Level_of_membership", "<", "=", "4" ]
[ "select", "avg", "(", "age", ")", "from", "visitor", "where", "level_of_membership", "<", "=", "value" ]
[ "What", "is", "the", "average", "age", "of", "the", "visitors", "whose", "membership", "level", "is", "not", "higher", "than", "4", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC
Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.
[ "SELECT", "name", ",", "Level_of_membership", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "age", "DESC" ]
[ "select", "name", ",", "level_of_membership", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "age", "desc" ]
[ "Find", "the", "name", "and", "membership", "level", "of", "the", "visitors", "whose", "membership", "level", "is", "higher", "than", "4", ",", "and", "sort", "by", "their", "age", "from", "old", "to", "young", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1
Find the id and name of the museum that has the most staff members?
[ "SELECT", "museum_id", ",", "name", "FROM", "museum", "ORDER", "BY", "num_of_staff", "DESC", "LIMIT", "1" ]
[ "select", "museum_id", ",", "name", "from", "museum", "order", "by", "num_of_staff", "desc", "limit", "value" ]
[ "Find", "the", "id", "and", "name", "of", "the", "museum", "that", "has", "the", "most", "staff", "members", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT avg(num_of_staff) FROM museum WHERE open_year < 2009
Find the average number of staff working for the museums that were open before 2009.
[ "SELECT", "avg", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", "<", "2009" ]
[ "select", "avg", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", "<", "value" ]
[ "Find", "the", "average", "number", "of", "staff", "working", "for", "the", "museums", "that", "were", "open", "before", "2009", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'
What are the opening year and staff number of the museum named Plaza Museum?
[ "SELECT", "Num_of_Staff", ",", "Open_Year", "FROM", "museum", "WHERE", "name", "=", "'Plaza", "Museum", "'" ]
[ "select", "num_of_staff", ",", "open_year", "from", "museum", "where", "name", "=", "value" ]
[ "What", "are", "the", "opening", "year", "and", "staff", "number", "of", "the", "museum", "named", "Plaza", "Museum", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)
find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.
[ "SELECT", "name", "FROM", "museum", "WHERE", "num_of_staff", ">", "(", "SELECT", "min", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", ">", "2010", ")" ]
[ "select", "name", "from", "museum", "where", "num_of_staff", ">", "(", "select", "min", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", ">", "value", ")" ]
[ "find", "the", "names", "of", "museums", "which", "have", "more", "staff", "than", "the", "minimum", "staff", "number", "of", "all", "museums", "opened", "after", "2010", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT t1.id , t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1
find the id, name and age for visitors who visited some museums more than once.
[ "SELECT", "t1.id", ",", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t1.id", "HAVING", "count", "(", "*", ")", ">", "1" ]
[ "select", "t1", ".", "id", ",", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t1", ".", "id", "having", "count", "(", "...
[ "find", "the", "id", ",", "name", "and", "age", "for", "visitors", "who", "visited", "some", "museums", "more", "than", "once", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1
What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?
[ "SELECT", "t2.visitor_id", ",", "t1.name", ",", "t1.Level_of_membership", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t2.visitor_id", "ORDER", "BY", "sum", "(", "t2.Total_spent", ")", "DESC", ...
[ "select", "t2", ".", "visitor_id", ",", "t1", ".", "name", ",", "t1", ".", "level_of_membership", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t2", ".", "visitor_id", ...
[ "What", "are", "the", "id", ",", "name", "and", "membership", "level", "of", "visitors", "who", "have", "spent", "the", "largest", "amount", "of", "money", "in", "total", "in", "all", "museum", "tickets", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1
What are the id and name of the museum visited most times?
[ "SELECT", "t2.Museum_ID", ",", "t1.name", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "GROUP", "BY", "t2.Museum_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "museum_id", ",", "t1", ".", "name", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "group", "by", "t2", ".", "museum_id", "order", "by", "count", "(", "*", ...
[ "What", "are", "the", "id", "and", "name", "of", "the", "museum", "visited", "most", "times", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)
What is the name of the museum that had no visitor yet?
[ "SELECT", "name", "FROM", "museum", "WHERE", "Museum_ID", "NOT", "IN", "(", "SELECT", "museum_id", "FROM", "visit", ")" ]
[ "select", "name", "from", "museum", "where", "museum_id", "not", "in", "(", "select", "museum_id", "from", "visit", ")" ]
[ "What", "is", "the", "name", "of", "the", "museum", "that", "had", "no", "visitor", "yet", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1
Find the name and age of the visitor who bought the most tickets at once.
[ "SELECT", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "ORDER", "BY", "t2.num_of_ticket", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "order", "by", "t2", ".", "num_of_ticket", "desc", "limit", "value" ]
[ "Find", "the", "name", "and", "age", "of", "the", "visitor", "who", "bought", "the", "most", "tickets", "at", "once", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit
What are the average and maximum number of tickets bought in all visits?
[ "SELECT", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "FROM", "visit" ]
[ "select", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "from", "visit" ]
[ "What", "are", "the", "average", "and", "maximum", "number", "of", "tickets", "bought", "in", "all", "visits", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1
What is the total ticket expense of the visitors whose membership level is 1?
[ "SELECT", "sum", "(", "t2.Total_spent", ")", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "WHERE", "t1.Level_of_membership", "=", "1" ]
[ "select", "sum", "(", "t2", ".", "total_spent", ")", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "where", "t1", ".", "level_of_membership", "=", "value" ]
[ "What", "is", "the", "total", "ticket", "expense", "of", "the", "visitors", "whose", "membership", "level", "is", "1", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2...
What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?
[ "SELECT", "t1.name", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "JOIN", "museum", "AS", "t3", "ON", "t3.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t3.open_year", "<", "2009", "INTERSECT", "SELECT", "t1.name...
[ "select", "t1", ".", "name", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "join", "museum", "as", "t3", "on", "t3", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t3", "....
[ "What", "is", "the", "name", "of", "the", "visitor", "who", "visited", "both", "a", "museum", "opened", "before", "2009", "and", "a", "museum", "opened", "after", "2011", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)
Find the number of visitors who did not visit any museum opened after 2010.
[ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "id", "NOT", "IN", "(", "SELECT", "t2.visitor_id", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t1.open_year", ">", "2010", ")"...
[ "select", "count", "(", "*", ")", "from", "visitor", "where", "id", "not", "in", "(", "select", "t2", ".", "visitor_id", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t...
[ "Find", "the", "number", "of", "visitors", "who", "did", "not", "visit", "any", "museum", "opened", "after", "2010", "." ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
museum_visit
SELECT count(*) FROM museum WHERE open_year > 2013 OR open_year < 2008
How many museums were opened after 2013 or before 2008?
[ "SELECT", "count", "(", "*", ")", "FROM", "museum", "WHERE", "open_year", ">", "2013", "OR", "open_year", "<", "2008" ]
[ "select", "count", "(", "*", ")", "from", "museum", "where", "open_year", ">", "value", "or", "open_year", "<", "value" ]
[ "How", "many", "museums", "were", "opened", "after", "2013", "or", "before", "2008", "?" ]
CREATE TABLE museum ( Museum_ID NUMBER PRIMARY KEY, Name TEXT, Num_of_Staff NUMBER, Open_Year TEXT ); CREATE TABLE visitor ( ID NUMBER PRIMARY KEY, Name TEXT, Level_of_membership NUMBER, Age NUMBER ); CREATE TABLE visit ( Museum_ID NUMBER PRIMARY KEY, visitor_ID TEXT, Num_of_Ticket NUMBER, Tot...
wta_1
SELECT count(*) FROM players
Find the total number of players.
[ "SELECT", "count", "(", "*", ")", "FROM", "players" ]
[ "select", "count", "(", "*", ")", "from", "players" ]
[ "Find", "the", "total", "number", "of", "players", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) FROM players
How many players are there?
[ "SELECT", "count", "(", "*", ")", "FROM", "players" ]
[ "select", "count", "(", "*", ")", "from", "players" ]
[ "How", "many", "players", "are", "there", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) FROM matches
Find the total number of matches.
[ "SELECT", "count", "(", "*", ")", "FROM", "matches" ]
[ "select", "count", "(", "*", ")", "from", "matches" ]
[ "Find", "the", "total", "number", "of", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) FROM matches
Count the number of matches.
[ "SELECT", "count", "(", "*", ")", "FROM", "matches" ]
[ "select", "count", "(", "*", ")", "from", "matches" ]
[ "Count", "the", "number", "of", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , birth_date FROM players WHERE country_code = 'USA'
List the first name and birth date of all players from the country with code USA.
[ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ]
[ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ]
[ "List", "the", "first", "name", "and", "birth", "date", "of", "all", "players", "from", "the", "country", "with", "code", "USA", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , birth_date FROM players WHERE country_code = 'USA'
What are the first names and birth dates of players from the USA?
[ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ]
[ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ]
[ "What", "are", "the", "first", "names", "and", "birth", "dates", "of", "players", "from", "the", "USA", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(loser_age) , avg(winner_age) FROM matches
Find the average age of losers and winners of all matches.
[ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ]
[ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ]
[ "Find", "the", "average", "age", "of", "losers", "and", "winners", "of", "all", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(loser_age) , avg(winner_age) FROM matches
What are the average ages of losers and winners across matches?
[ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ]
[ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ]
[ "What", "are", "the", "average", "ages", "of", "losers", "and", "winners", "across", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(winner_rank) FROM matches
Find the average rank of winners in all matches.
[ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ]
[ "select", "avg", "(", "winner_rank", ")", "from", "matches" ]
[ "Find", "the", "average", "rank", "of", "winners", "in", "all", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(winner_rank) FROM matches
What is the average rank for winners in all matches?
[ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ]
[ "select", "avg", "(", "winner_rank", ")", "from", "matches" ]
[ "What", "is", "the", "average", "rank", "for", "winners", "in", "all", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT min(loser_rank) FROM matches
Find the highest rank of losers in all matches.
[ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ]
[ "select", "min", "(", "loser_rank", ")", "from", "matches" ]
[ "Find", "the", "highest", "rank", "of", "losers", "in", "all", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT min(loser_rank) FROM matches
What is the best rank of losers across all matches?
[ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ]
[ "select", "min", "(", "loser_rank", ")", "from", "matches" ]
[ "What", "is", "the", "best", "rank", "of", "losers", "across", "all", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT country_code) FROM players
find the number of distinct country codes of all players.
[ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ]
[ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ]
[ "find", "the", "number", "of", "distinct", "country", "codes", "of", "all", "players", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT country_code) FROM players
How many distinct countries do players come from?
[ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ]
[ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ]
[ "How", "many", "distinct", "countries", "do", "players", "come", "from", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT loser_name) FROM matches
Find the number of distinct name of losers.
[ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ]
[ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ]
[ "Find", "the", "number", "of", "distinct", "name", "of", "losers", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT loser_name) FROM matches
How many different loser names are there?
[ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ]
[ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ]
[ "How", "many", "different", "loser", "names", "are", "there", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10
Find the name of tourney that has more than 10 matches.
[ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ]
[ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ]
[ "Find", "the", "name", "of", "tourney", "that", "has", "more", "than", "10", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10
What are the names of tournaments that have more than 10 matches?
[ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ]
[ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ]
[ "What", "are", "the", "names", "of", "tournaments", "that", "have", "more", "than", "10", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016
List the names of all winners who played in both 2013 and 2016.
[ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ]
[ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ]
[ "List", "the", "names", "of", "all", "winners", "who", "played", "in", "both", "2013", "and", "2016", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016
What are the names of players who won in both 2013 and 2016?
[ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ]
[ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ]
[ "What", "are", "the", "names", "of", "players", "who", "won", "in", "both", "2013", "and", "2016", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
List the number of all matches who played in years of 2013 or 2016.
[ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ]
[ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ]
[ "List", "the", "number", "of", "all", "matches", "who", "played", "in", "years", "of", "2013", "or", "2016", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
How many matches were played in 2013 or 2016?
[ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ]
[ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ]
[ "How", "many", "matches", "were", "played", "in", "2013", "or", "2016", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open...
What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?
[ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", ...
[ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "se...
[ "What", "are", "the", "country", "code", "and", "first", "name", "of", "the", "players", "who", "won", "in", "both", "tourney", "WTA", "Championships", "and", "Australian", "Open", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open...
What are the first names and country codes for players who won both the WTA Championships and the Australian Open?
[ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", ...
[ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "se...
[ "What", "are", "the", "first", "names", "and", "country", "codes", "for", "players", "who", "won", "both", "the", "WTA", "Championships", "and", "the", "Australian", "Open", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1
Find the first name and country code of the oldest player.
[ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ]
[ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ]
[ "Find", "the", "first", "name", "and", "country", "code", "of", "the", "oldest", "player", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1
What is the first name and country code of the oldest player?
[ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ]
[ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ]
[ "What", "is", "the", "first", "name", "and", "country", "code", "of", "the", "oldest", "player", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , last_name FROM players ORDER BY birth_date
List the first and last name of all players in the order of birth date.
[ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ]
[ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ]
[ "List", "the", "first", "and", "last", "name", "of", "all", "players", "in", "the", "order", "of", "birth", "date", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , last_name FROM players ORDER BY birth_date
What are the full names of all players, sorted by birth date?
[ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ]
[ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ]
[ "What", "are", "the", "full", "names", "of", "all", "players", ",", "sorted", "by", "birth", "date", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date
List the first and last name of all players who are left / L hand in the order of birth date.
[ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ]
[ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ]
[ "List", "the", "first", "and", "last", "name", "of", "all", "players", "who", "are", "left", "/", "L", "hand", "in", "the", "order", "of", "birth", "date", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date
What are the full names of all left handed players, in order of birth date?
[ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ]
[ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ]
[ "What", "are", "the", "full", "names", "of", "all", "left", "handed", "players", ",", "in", "order", "of", "birth", "date", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
Find the first name and country code of the player who did the most number of tours.
[ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ]
[ "Find", "the", "first", "name", "and", "country", "code", "of", "the", "player", "who", "did", "the", "most", "number", "of", "tours", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
What is the first name and country code of the player with the most tours?
[ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ]
[ "What", "is", "the", "first", "name", "and", "country", "code", "of", "the", "player", "with", "the", "most", "tours", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Find the year that has the most number of matches.
[ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "year", "that", "has", "the", "most", "number", "of", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Which year had the most matches?
[ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "year", "had", "the", "most", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
Find the name and rank points of the winner who won the most times.
[ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "name", "and", "rank", "points", "of", "the", "winner", "who", "won", "the", "most", "times", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
What is the name of the winner who has won the most matches, and how many rank points does this player have?
[ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "winner", "who", "has", "won", "the", "most", "matches", ",", "and", "how", "many", "rank", "points", "does", "this", "player", "have", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
[ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ]
[ "Find", "the", "name", "of", "the", "winner", "who", "has", "the", "highest", "rank", "points", "and", "participated", "in", "the", "Australian", "Open", "tourney", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
What is the name of the winner with the most rank points who participated in the Australian Open tournament?
[ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "winner", "with", "the", "most", "rank", "points", "who", "participated", "in", "the", "Australian", "Open", "tournament", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1
find the names of loser and winner who played in the match with greatest number of minutes.
[ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ]
[ "find", "the", "names", "of", "loser", "and", "winner", "who", "played", "in", "the", "match", "with", "greatest", "number", "of", "minutes", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1
What are the names of the winner and loser who played in the longest match?
[ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ]
[ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ]
[ "What", "are", "the", "names", "of", "the", "winner", "and", "loser", "who", "played", "in", "the", "longest", "match", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
Find the average ranking for each player and their first name.
[ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ]
[ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ]
[ "Find", "the", "average", "ranking", "for", "each", "player", "and", "their", "first", "name", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
What are the first names of all players, and their average rankings?
[ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ]
[ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ]
[ "What", "are", "the", "first", "names", "of", "all", "players", ",", "and", "their", "average", "rankings", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
Find the total ranking points for each player and their first name.
[ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ]
[ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ]
[ "Find", "the", "total", "ranking", "points", "for", "each", "player", "and", "their", "first", "name", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
What are the first names of all players, and their total ranking points?
[ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ]
[ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ]
[ "What", "are", "the", "first", "names", "of", "all", "players", ",", "and", "their", "total", "ranking", "points", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , country_code FROM players GROUP BY country_code
find the number of players for each country.
[ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ]
[ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ]
[ "find", "the", "number", "of", "players", "for", "each", "country", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , country_code FROM players GROUP BY country_code
How many players are from each country?
[ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ]
[ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ]
[ "How", "many", "players", "are", "from", "each", "country", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
find the code of the country where has the greatest number of players.
[ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "find", "the", "code", "of", "the", "country", "where", "has", "the", "greatest", "number", "of", "players", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
What is the code of the country with the most players?
[ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "code", "of", "the", "country", "with", "the", "most", "players", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50
Find the codes of countries that have more than 50 players.
[ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ]
[ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ]
[ "Find", "the", "codes", "of", "countries", "that", "have", "more", "than", "50", "players", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50
What are the codes of countries with more than 50 players?
[ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ]
[ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ]
[ "What", "are", "the", "codes", "of", "countries", "with", "more", "than", "50", "players", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date
Find the total number of tours for each ranking date.
[ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ]
[ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ]
[ "Find", "the", "total", "number", "of", "tours", "for", "each", "ranking", "date", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date
How many total tours were there for each ranking date?
[ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ]
[ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ]
[ "How", "many", "total", "tours", "were", "there", "for", "each", "ranking", "date", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , YEAR FROM matches GROUP BY YEAR
Find the number of matches happened in each year.
[ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ]
[ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ]
[ "Find", "the", "number", "of", "matches", "happened", "in", "each", "year", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , YEAR FROM matches GROUP BY YEAR
How many matches were played in each year?
[ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ]
[ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ]
[ "How", "many", "matches", "were", "played", "in", "each", "year", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3
Find the name and rank of the 3 youngest winners across all matches.
[ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ]
[ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ]
[ "Find", "the", "name", "and", "rank", "of", "the", "3", "youngest", "winners", "across", "all", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3
What are the names and ranks of the three youngest winners across all matches?
[ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ]
[ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ]
[ "What", "are", "the", "names", "and", "ranks", "of", "the", "three", "youngest", "winners", "across", "all", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'
How many different winners both participated in the WTA Championships and were left handed?
[ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ]
[ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ]
[ "How", "many", "different", "winners", "both", "participated", "in", "the", "WTA", "Championships", "and", "were", "left", "handed", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'
Find the number of left handed winners who participated in the WTA Championships.
[ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ]
[ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ]
[ "Find", "the", "number", "of", "left", "handed", "winners", "who", "participated", "in", "the", "WTA", "Championships", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
[ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_...
[ "Find", "the", "first", "name", ",", "country", "code", "and", "birth", "date", "of", "the", "winner", "who", "has", "the", "highest", "rank", "points", "in", "all", "matches", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
What is the first name, country code, and birth date of the player with the most winner rank points across all matches?
[ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_...
[ "What", "is", "the", "first", "name", ",", "country", "code", ",", "and", "birth", "date", "of", "the", "player", "with", "the", "most", "winner", "rank", "points", "across", "all", "matches", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , hand FROM players GROUP BY hand
Find the number of players for each hand type.
[ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ]
[ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ]
[ "Find", "the", "number", "of", "players", "for", "each", "hand", "type", "." ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
wta_1
SELECT count(*) , hand FROM players GROUP BY hand
How many players are there for each hand type?
[ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ]
[ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ]
[ "How", "many", "players", "are", "there", "for", "each", "hand", "type", "?" ]
CREATE TABLE players ( player_id NUMBER PRIMARY KEY, first_name TEXT, last_name TEXT, hand TEXT, birth_date TIME, country_code TEXT ); CREATE TABLE matches ( best_of NUMBER, draw_size NUMBER, loser_age NUMBER, loser_entry TEXT, loser_hand TEXT, loser_ht NUMBER, loser_id NUMBER, loser_ioc TE...
battle_death
SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'
How many ships ended up being 'Captured'?
[ "SELECT", "count", "(", "*", ")", "FROM", "ship", "WHERE", "disposition_of_ship", "=", "'Captured", "'" ]
[ "select", "count", "(", "*", ")", "from", "ship", "where", "disposition_of_ship", "=", "value" ]
[ "How", "many", "ships", "ended", "up", "being", "'Captured", "'", "?" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT name , tonnage FROM ship ORDER BY name DESC
List the name and tonnage ordered by in descending alphaetical order for the names.
[ "SELECT", "name", ",", "tonnage", "FROM", "ship", "ORDER", "BY", "name", "DESC" ]
[ "select", "name", ",", "tonnage", "from", "ship", "order", "by", "name", "desc" ]
[ "List", "the", "name", "and", "tonnage", "ordered", "by", "in", "descending", "alphaetical", "order", "for", "the", "names", "." ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT name , date FROM battle
List the name, date and result of each battle.
[ "SELECT", "name", ",", "date", "FROM", "battle" ]
[ "select", "name", ",", "date", "from", "battle" ]
[ "List", "the", "name", ",", "date", "and", "result", "of", "each", "battle", "." ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT max(killed) , min(killed) FROM death
What is maximum and minimum death toll caused each time?
[ "SELECT", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "FROM", "death" ]
[ "select", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "from", "death" ]
[ "What", "is", "maximum", "and", "minimum", "death", "toll", "caused", "each", "time", "?" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT avg(injured) FROM death
What is the average number of injuries caused each time?
[ "SELECT", "avg", "(", "injured", ")", "FROM", "death" ]
[ "select", "avg", "(", "injured", ")", "from", "death" ]
[ "What", "is", "the", "average", "number", "of", "injuries", "caused", "each", "time", "?" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'
What are the death and injury situations caused by the ship with tonnage 't'?
[ "SELECT", "T1.killed", ",", "T1.injured", "FROM", "death", "AS", "T1", "JOIN", "ship", "AS", "t2", "ON", "T1.caused_by_ship_id", "=", "T2.id", "WHERE", "T2.tonnage", "=", "'t", "'" ]
[ "select", "t1", ".", "killed", ",", "t1", ".", "injured", "from", "death", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "caused_by_ship_id", "=", "t2", ".", "id", "where", "t2", ".", "tonnage", "=", "value" ]
[ "What", "are", "the", "death", "and", "injury", "situations", "caused", "by", "the", "ship", "with", "tonnage", "'t", "'", "?" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril'
What are the name and results of the battles when the bulgarian commander is not 'Boril'
[ "SELECT", "name", ",", "RESULT", "FROM", "battle", "WHERE", "bulgarian_commander", "!", "=", "'Boril", "'" ]
[ "select", "name", ",", "result", "from", "battle", "where", "bulgarian_commander", "!", "=", "value" ]
[ "What", "are", "the", "name", "and", "results", "of", "the", "battles", "when", "the", "bulgarian", "commander", "is", "not", "'Boril", "'" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'
What are the different ids and names of the battles that lost any 'Brig' type shipes?
[ "SELECT", "DISTINCT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.ship_type", "=", "'Brig", "'" ]
[ "select", "distinct", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "ship_type", "=", "value" ]
[ "What", "are", "the", "different", "ids", "and", "names", "of", "the", "battles", "that", "lost", "any", "'Brig", "'", "type", "shipes", "?" ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...
battle_death
SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10
What are the ids and names of the battles that led to more than 10 people killed in total.
[ "SELECT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "JOIN", "death", "AS", "T3", "ON", "T2.id", "=", "T3.caused_by_ship_id", "GROUP", "BY", "T1.id", "HAVING", "sum", "(", "T3...
[ "select", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "join", "death", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "caused_by_s...
[ "What", "are", "the", "ids", "and", "names", "of", "the", "battles", "that", "led", "to", "more", "than", "10", "people", "killed", "in", "total", "." ]
CREATE TABLE battle ( id NUMBER PRIMARY KEY, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT ); CREATE TABLE ship ( lost_in_battle NUMBER, id NUMBER PRIMARY KEY, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT, FOREIGN KEY (...